| Author |
Doubt about IO package
|
vivekkumar sharma
Ranch Hand
Joined: Dec 21, 2005
Posts: 70
|
posted

0
|
Hi Ranchers, In the following code I get IOexception : Stream already closed. It works fine if i comment line 1 below. I am not sure how buffered writer works. Can some one explain, does BufferedWriter open FileWriter dtream before writing or not. TA Vivek
|
 |
wise owen
Ranch Hand
Joined: Feb 02, 2006
Posts: 2023
|
posted

0
|
|
In BufferedWriter.java code, its write function does not open file.
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16695
|
|
Furthermore, in order for the BufferedWriter to work "properly", you should not be writing directly to the FileWriter. Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
 |
|
|
subject: Doubt about IO package
|
|
|