为了向文件hello.txt尾加数据,下列哪个是正确创建指向hello.txt的流?
A. try { OutputStream out = new FileOutputStream ("hello.txt"); }catch(IOException e){ }
B. try { OutputStream out = new FileOutputStream ("hello.txt",true);}catch(IOException e){ }
C. try { OutputStream out = new FileOutputStream ("hello.txt" ,false);}catch(IOException e){ }
D. try { OutputStream out = new OutputStream ("hello.txt" ,true);}catch(IOException e){ }
查看答案
FileInputStream流的read方法和FileReader流的read方法有何不同?
BufferedReader流能直接指向一个文件吗?
使用ObjectInputStream 和ObjectOutputStream类有哪些注意事项?