import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
public class Test_01 {
public static void main(String[] args) throws IOException{
// 练习 修改标准输入流 和 输出流 完成图片拷贝
System.setIn(new FileInputStream("one.jpg"));
System.setOut(new PrintStream("copy.jpg"));
InputStream in = System.in;
PrintStream out = System.out;
int len;
byte[] arr = new byte[1024];
while((len = in.read(arr))!=-1){
out.write(arr,0,len);
}
in.close();
out.close();
}
}