@@ -0,0 +1,798 @@
+package org.javacore.io;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.DataInputStream;%0Aimport java.io.EOFException;%0Aimport java.io.File;%0Aimport java.io.IOException;%0A/**%0A * @author Jeff Lee%0A * @since 2015-7-15 20:42:47%0A * %E6%A0%BC%E5%BC%8F%E5%8C%96%E5%86%85%E5%AD%98%E8%BE%93%E5%85%A5%0A */%0Apublic class FormatteMemoryInput %7B%0A%09public static void main(String%5B%5D args) throws IOException %7B%0A%09%09String filePath = %22src%22 + File.separator +%0A%09%09%09%09%22org%22 + File.separator +%0A%09%09%09%09%22javacore%22 + File.separator +%0A%09%09%09%09%22io%22 + File.separator +%0A%09%09%09%09%22FormatteMemoryInput.java%22;%0A%09%09try %7B%0A%09%09%09DataInputStream in = new DataInputStream(%0A%09%09%09%09%09// %E7%BC%93%E5%86%B2%E5%8C%BA%E5%AD%97%E8%8A%82%E8%BE%93%E5%85%A5%0A%09%09%09%09%09new ByteArrayInputStream(%0A%09%09%09%09%09%09%09BufferedInputFileT.read(filePath).getBytes()));%0A%09%09%09while(true)%0A%09%09%09%09System.out.println((char)in.readByte());%0A%09%09%7D catch (EOFException e) %7B%0A%09%09%09System.out.println(%22End of Stream%22);%0A%09%09%7D%0A%09%7D%0A%7D%0A

格式化内存输入 2015-7-15 20:43:07