使用DataInputStream从文件读取char
import java.io.DataInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; /** from 时 代 J a v a 公 众 号 - N o w J a v a . c o m**/ import java.io.IOException; public class Main { public static void main(String[] args) { String strFilePath = "C://Folder//readChar.txt"; try { //create FileInputStream object FileInputStream fin = new FileInputStream(strFilePath); DataInputStream din = new DataInputStream(fin); /*from n o w j a v a . c o m - 时 代 Java*/ char ch = din.readChar(); System.out.println("Char : " + ch); din.close(); } catch(FileNotFoundException fe) { System.out.println(