摘要: //缓存数据流 @Test public void testBufferReaderAndWriter() throws IOException{ //创建文件字符输入流 Reader in=new FileReader("abc.txt"); BufferedReader br=new Bu... 阅读全文
posted @ 2014-06-16 11:19 清风yi竹 阅读(212) 评论(0) 推荐(0) 编辑
摘要: //输出流 @Test public void testOutStream() throws Exception{ OutputStream out =new FileOutputStream("abc.txt"); String content="hello word/nwww.baidu.c... 阅读全文
posted @ 2014-06-16 09:48 清风yi竹 阅读(120) 评论(0) 推荐(0) 编辑
摘要: @Test public void test() throws Exception{ //创建输入数据流对象 InputStream In=new FileInputStream("HellWord.txt"); try { //System.out.print((ch... 阅读全文
posted @ 2014-06-16 09:44 清风yi竹 阅读(125) 评论(0) 推荐(0) 编辑
摘要: @Test public void fileTest() { //创建File 对象 File file=new File("hell.txt"); //获取文件名 System.out.println(file.getName()); //访问文件的绝对路径 System.out.p... 阅读全文
posted @ 2014-06-16 09:41 清风yi竹 阅读(249) 评论(0) 推荐(0) 编辑