标签:height package uri read print efi write close put
package io;import java.io.*;public class TypeFile {
public static void main(String[] args) {
FileInputStream fin;
FileOutputStream fout;
int ch;
if(args.length<1){
System.out.println("请指定文件名!");
return;
}
try {
fin=new FileInputStream(args[0]);
fout=new FileOutputStream(FileDescriptor.out);
while((ch=fin.read())!=-1)
fout.write(ch);
fin.close();
fout.close();
} catch (FileNotFoundException e) {
System.out.println("文件没有找到!");
} catch (IOException e) {
System.out.println("输入流有误!");
}
}
}
标签:height package uri read print efi write close put
原文地址:http://www.cnblogs.com/m2492565210/p/7466165.html