Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-05-2007, 07:18 PM
Senior Member
 
Join Date: Jun 2007
Posts: 119
Rep Power: 0
Peter is on a distinguished road
Default BufferedReader empty
I want to know if really the sentence "BufferedReader" saves the information in buffer because when I execute the following sentences the BufferedReader is empty
why does it happen?

Code:
br = new BufferedReader(new FileReader(file)); 

FileWriter fw = new FileWriter(file); 

while ((str = br.readLine())!= null)
thanks,
peter
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 06-06-2007, 02:44 PM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Rep Power: 3
Heather is on a distinguished road
Default
Create a BufferedReader doesn't save in memory the information in buffer.
BufferedReader improves the performance of the reader, avoid access to the disk when you are reading.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-02-2007, 07:52 PM
Ed Ed is offline
Senior Member
 
Join Date: Jun 2007
Posts: 110
Rep Power: 0
Ed is on a distinguished road
Default
heather is right
I give you some link and then you read it to inform you
BufferedReader
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Empty ResultSet Java Tip Java Tips 0 02-09-2008 09:36 PM
Deleting an empty directory Java Tip Java Tips 0 01-13-2008 08:17 AM
Not Empty check of texboxes using javascript Anju Jose JavaServer Pages (JSP) and JSTL 0 01-09-2008 01:04 PM
Removing empty lines from code using Eclipse javaplus Eclipse 1 12-14-2007 10:21 PM
How to use BufferedReader? ProgramBeginner New To Java 2 11-04-2007 10:08 AM


All times are GMT +2. The time now is 06:45 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org