1. 字节流

@Testpublic void test4() throws IOException {File src = new File("2.png");File dest = new File("2_copy.png");FileInputStream fis = new FileInputStream(src);FileOutputStream fos = new FileOutputStream(dest);byte[] bytes = new byte[1024];int len;while((len=fis.read(bytes))!=-1){fos.write(bytes,0,len);}fis.close();fos.close();}
