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

📄 fileinputstream1.java

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

public class FileInputStream1 {
	public static void main(String[] args) {
		FileInputStream fin = null;
		try {
			fin = new FileInputStream("d:\\share\\jproject\\io\\a.txt");			
		}catch(FileNotFoundException e) {
			System.out.println("the file is not found now!!");
		}
		
		try {
			int b = 0;
			while((b=fin.read()) != -1) {
				System.out.print((char)b);
			}
		}catch(IOException e) {
			System.out.println("the file read is error!!");
		}
		
	}
}

⌨️ 快捷键说明

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