java字节流复制文件
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
//字节流复制文件
public class FileInputStream2 {
public static void main(String[] args) throws IOException {
FileInputStream fileInputStream = new FileInputStream("E:\\Workpace\\abc.txt");
FileOutputStream fileOutputStream = new FileOutputStream("E:\\Workpace\\ccc.txt");
int b;
while((b = fileInputStream.read()) != -1){
fileOutputStream.write(b);
}
fileInputStream.close();
fileOutputStream.close();
}
}