使用DataInputStream从文件中读取简短内容
/* from nowjava.com - 时 代 Java */ import java.io.DataInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; public class Main { public static void main(String[] args) { String strFilePath = "C://Folder//readShort.txt"; try// 来 自 nowjava.com - 时代Java { FileInputStream fin = new FileInputStream(strFilePath); DataInputStream din = new DataInputStream(fin); short s = din.readShort(); System.out.println("short : " + s); din.close(); } catch(FileNotFoundException fe) { System.out.println(