字节缓冲流四种方式实现复制
1.基本字节流一次读写一个字节 2.基本字节流一个读写一个字节数组
3.字节缓冲流一次读写一个字节 4.字节缓冲流一次读写一个字节数组
开始时间:long startTime = System.currentTimeMillis();
结束时间:long endTime = System.currentTimeMillis();
public class Copy1 {
public static void main(String[] args) throws IOException {
//基本字节流一次读写一个字节
method1();
//基本字节流一个读写一个字节数组
method2();
//字节缓冲流一次读写一个字节
method3();
//字节缓冲流一次读写一个字节数组
method4();
}
public static void method1() throws IOException {
FileInputStream fis = new FileInputStream("路径");
FileOutputStream fos =