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

📄 fileexe.java

📁 Java语言程序设计-源代码(第三部分)和课程相对应的提供了一些用于学习理解的代码设计
💻 JAVA
字号:
import java.io.*;
class FileExe{
	public static void main(String args[]){
	int count;
	byte b[]=new byte[1024];
	FileInputStream fis;
	FileOutputStream fos;
	try{
		fis=new FileInputStream(args[0]);
		}
	catch(FileNotFoundException e){
		System.out.println("InputFile is not found!");
		return;
	}
	try{
		fos=new FileOutputStream(args[1]);
		}
	catch(FileNotFoundException e){
		System.out.println("OutputFile is not found!");
		return;
	  }
	catch(ArrayIndexOutOfBoundsException e){
		System.out.println();
		return;}
	try{
		while((count=fis.read(b,0,1024))!=-1)
		{fos.write(b,0,count);}
		}
	catch(IOException e){
		System.out.println("Error:"+e);
		return;
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -