摘要: 1、字节形式读取 1 @Test 2 public void test1(){ 3 String path = "d://temp/test.txt"; 4 readFile(path); 5 } 6 7 private void readFile(String path) { 8 //FileInputStream 用于读取诸如图像数据之类的原始字节流。要读取字符流,请考虑使用 FileReader 9 File file = new File(path);10 InputStream in = null;11 try {12 ... 阅读全文
posted @ 2013-08-26 22:52 Gnight 阅读(602) 评论(0) 推荐(0) 编辑