标签:
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class CopyFile {
/**
* @param args
*/
public static void main(String[] args) {
try {
FileInputStream fis = new FileInputStream ("E://a.mp3");
FileOutputStream fos = new FileOutputStream ("E://temp.mp3");
BufferedInputStream bis=new BufferedInputStream(fis);
BufferedOutputStream bos=new BufferedOutputStream(fos);
int read = bis.read();
while ( read != -1 ) {
bos.write(read);
read = bis.read();
}
bis.close();
bos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
标签:
原文地址:http://www.cnblogs.com/songjiangtao521/p/5376457.html