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

📄 example9_1_1.java

📁 主要是对于JAVA的编程的基本语言 希望能够帮得上你。
💻 JAVA
字号:
package ForTest;

import java.io.*;

public class Example9_1_1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		File inputFile=new File("ForTest/InputStream.jpg");
		File outputFile=new File("ForTest/ok.jpg");
		int ch;
		
		try {
			FileInputStream in=new FileInputStream(inputFile);
			FileOutputStream out=new FileOutputStream(outputFile);			
			System.out.println("文件开始复制……");
			int count=0;
			while((ch=in.read())!=-1){
				out.write(ch);
				count++;
				System.out.println("No. "+count+" byte");				
			}
			in.close();
			out.close();
			System.out.println("文件复制结束!");
			
		} catch (FileNotFoundException e) {		
			e.printStackTrace();
		} catch (IOException e) {			
			e.printStackTrace();
		}
	}

}

⌨️ 快捷键说明

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