package random;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class BufferImpl {
public static void main(String[] args) throws Exception{
int a = 0;
BufferedInputStream bis = new BufferedInputStream(new FileInputStream("c:\\测试\\a.txt"));
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("c:\\测试\\f.txt"));
while ((a = bis.read()) > 0) {
bos.write(a);
}
bos.flush();
bis.close();
bos.close();
}
}
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class BufferImpl {
public static void main(String[] args) throws Exception{
int a = 0;
BufferedInputStream bis = new BufferedInputStream(new FileInputStream("c:\\测试\\a.txt"));
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("c:\\测试\\f.txt"));
while ((a = bis.read()) > 0) {
bos.write(a);
}
bos.flush();
bis.close();
bos.close();
}
}