⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lx16.java

📁 JAVA学习源代码,大家可以好好参考,请多提宝贵意见
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -