Results 1 to 3 of 3
  1. #1
    dalu is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default InputStream and BufferedInputStream

    Hi,

    I was trying to implement a simple java program to read the contents of a file using BufferedReader. Thats when I happened to come across an example where FileInputStream and BufferedInputStream was used to read the file. What is the difference between the two???

    Regards
    Dalu

  2. #2
    ballantony is offline Member
    Join Date
    Oct 2011
    Posts
    5
    Rep Power
    0

    Default Re: InputStream and BufferedInputStream


  3. #3
    dheaven is offline Member
    Join Date
    Oct 2011
    Posts
    15
    Rep Power
    0

    Default Re: InputStream and BufferedInputStream

    The BufferedInputStream actually does the reading but it needs a stream specified. The InputStream is used in order to do that (in establishes a connection to the text file).

    Check this to see some examples:
    Dystopian Code: Text File I/O in Java
    Dystopian Code: Text File I/O with Strings that Contain Spaces in Java

Similar Threads

  1. BufferedInputStream
    By prinnori in forum New To Java
    Replies: 5
    Last Post: 08-30-2011, 01:58 PM
  2. Creating an InputStream
    By c26354 in forum New To Java
    Replies: 10
    Last Post: 07-12-2011, 05:48 AM
  3. InputStream problem
    By javabarn in forum New To Java
    Replies: 10
    Last Post: 06-29-2010, 05:09 PM
  4. BufferedInputStream with Huffman Compression
    By Msnforum in forum New To Java
    Replies: 0
    Last Post: 11-03-2009, 10:04 PM
  5. Replies: 1
    Last Post: 08-07-2007, 08:16 AM

Posting Permissions

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