public class 字节读取图片 {
public static void main(String[] args) throws IOException{
BufferedInputStream fis = new BufferedInputStream(new FileInputStream("F:\\demo11_看图王.jpg"));
BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream("F:\\demo.jpg"));
byte[] bys = new byte[1024];
int len = 0;
while((len=fis.read(bys))!=-1){
fos.write(len);
}
fos.close();
fis.close();
}
} |
|