标签:output package image mamicode str out block png put
package file2; import java.io.FileInputStream; import java.io.FileOutputStream; public class FileCopy { public static void main(String[] args) { //铺设管道 try { FileInputStream fis = new FileInputStream("D:\\20200415.txt"); //创建一个程序通往盘符的管道 FileOutputStream fos = new FileOutputStream("D:\\eclipseWork\\20200415.txt"); //开水龙头 int ch = 0; while((ch = fis.read())!=-1){ fos.write(ch); } //关水龙头 fis.close(); fos.close(); } catch (Exception e) { // TODO Auto-generated catch block System.out.println("文件找不到"); } } }
标签:output package image mamicode str out block png put
原文地址:https://www.cnblogs.com/hsy-go/p/12491841.html