结论:Buffered+数组 这种方式速度是最快的。
public void testBufferedIO(String source,String target){
BufferedInputStream bufferedInputStream = null;
BufferedOutputStream bufferedOutputStream= null;
try {
bufferedInputStream = new BufferedInputStream(new FileInputStream(source));
bufferedOutputStream= new BufferedOutputStream(new FileOutputStream(target));
byte[] data = new byte[1024];
int length = -1;
while ((length=bufferedInputStream.read(data))>-1){
bufferedOutputStream.write(data);
}
} catch (IOException e) {
e.printStackTrace();
}
}