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

📄 fileoutputstream1.java

📁 这是java io流的一个通信小程序
💻 JAVA
字号:
import java.io.*;

public class FileOutputStream1 {
	public static void main(String[] args) {
		FileInputStream fin = null;
		FileOutputStream fout = null;
		try {
			fin = new FileInputStream("d:\\a.txt");
		}catch(FileNotFoundException e) {
			System.out.println("the file is not found!!");
		}
		
		try {
			fout = new FileOutputStream("d:\\share\\jproject\\io\\b.txt");
			int b = 0;
			
			while((b=fin.read()) != -1) {
				fout.write(b);
			}
			fin.close();
			fout.close();
			
			
		}catch(FileNotFoundException e) {
			System.out.println("the file is not found too!!");
		}catch(IOException e) {
			System.out.println("the Io Exception !!");
		}
		
	}
}

⌨️ 快捷键说明

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