java中使用IO流将以文件中的内容去取到指定的文件中
public class Demo12 {
public static void main(String[] args) throws IOException {
File file=new File("1.txt");
FileInputStream fis=new FileInputStream(file);
FileOutputStream fos=new FileOutputStream(new File("4.txt"));
byte[] bt=new byte[1024];
int count;
while((count=fis.read(bt))!=-1) {
fos.write(bt,0,count);
}
fis.close();
fos.close();
}
}

浙公网安备 33010602011771号