Results 1 to 3 of 3
  1. #1
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    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?

    Java Code:
    br = new BufferedReader(new FileReader(file)); 
    
    FileWriter fw = new FileWriter(file); 
    
    while ((str = br.readLine())!= null)
    thanks,
    peter

  2. #2
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    8

    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.

  3. #3
    Ed
    Ed is offline Senior Member
    Join Date
    Jun 2007
    Posts
    110
    Rep Power
    0

    Default

    heather is right
    I give you some link and then you read it to inform you
    BufferedReader

Similar Threads

  1. How to use BufferedReader?
    By ProgramBeginner in forum New To Java
    Replies: 4
    Last Post: 10-11-2011, 03:56 PM
  2. Empty ResultSet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-09-2008, 09:36 PM
  3. Deleting an empty directory
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-13-2008, 08:17 AM
  4. Not Empty check of texboxes using javascript
    By Anju Jose in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 01-09-2008, 01:04 PM
  5. Removing empty lines from code using Eclipse
    By javaplus in forum Eclipse
    Replies: 1
    Last Post: 12-14-2007, 10:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •