实现一个文件的内容拷贝到另一个文件里
public void copyDemo () throws IOException {
//创建文件输入流
FileInputStream fis = new FileInputStream("d:\\bbb.txt");
//创建文件输出流
FileOutputStream fos = new FileOutputStream("d:\\ccc.txt");
//如果读取到内容则把内容写入另一个文件里
int c;
while ((c = fis.read()) > ) {
fos.write(c);
} fis.close();
fos.close();
}