When to close BufferedReader and File handles
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   David_Clements
Posted On:   Thursday, April 3, 2003 02:06 PM

If you close a BufferedReader that was created with an InputStream like this



b = new BifferedReader( new FileInputStream(file));




Then you do: b.close(), will you leak a file handle?

Or will b.close() close the InputStream also?


Dave

Re: When to close BufferedReader and File handles

Posted By:   Rob_Eamon  
Posted On:   Thursday, April 3, 2003 10:06 PM

BufferedReader.close() calls the the close method of the Reader specified in the constructor.
About | Sitemap | Contact