lx16.java
来自「JAVA学习源代码,大家可以好好参考,请多提宝贵意见」· Java 代码 · 共 57 行
JAVA
57 行
import java.io.*;
public class Lx16
{
public static void main(String args[]) throws IOException
{
int i;
FileInputStream fin;
FileOutputStream fout;
try
{
try
{
fin=new FileInputStream(args[0]);
}
catch(FileNotFoundException e)
{
System.out.println("Input File Not Found");
return;
}
try
{
fout=new FileOutputStream(args[1]);
}
catch(FileNotFoundException e)
{
System.out.println("Output File Not Found");
return;
}
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("Usage: Lx16 From TO");
return;
}
try
{
do
{
i=fin.read();
System.out.print((char)i);
if(i!=-1)fout.write(i);
}while(i!=-1);
}
catch(IOException e)
{
System.out.println("File Error ");
}
fin.close();
fout.close();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?