}
/** * 输入的数据流 相当于解密 */ public static void testData1(){ DataInputStream dis = null; try { dis = new DataInputStream(new FileInputStream(new File("data.txt"))); String str = dis.readUTF(); System.out.println(str); boolean b = dis.readBoolean(); System.out.println(b); long l = dis.readLong(); System.out.println(l); } catch (IOException e) { e.printStackTrace(); }finally { if(dis != null){ try { dis.close(); } catch (IOException e) { e.printStackTrace(); } } } }
