package cn.wan;
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
/*FileOutputStream fileOutputStream = new FileOutputStream("text.txt");
for (int i = 0; i < 2048; i++) {
fileOutputStream.write(i % 94 + 33);
}
fileOutputStream.close();*/
FileInputStream fileInputStream = new FileInputStream("C:/Users/39657/Desktop/page1.png");
FileOutputStream fileOutputStream = new FileOutputStream("page1.png");
byte[] bytes = new byte[1024];
while (true) {
int len = fileInputStream.read(bytes);
System.out.println(len);
if (len != -1) {
fileOutputStream.write(bytes);
} else {
break;
}
}
fileOutputStream.close();
fileInputStream.close();
}
}