• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

input stream reader and buffer

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if these are advanced topics or not, but I was curious how they worked. Thanks in advance.

InputStreamReader - how is this different from the Scanner?
Bufferreader - is this similar to Streaming where it takes a bit of the information at a time?
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David De wrote:InputStreamReader - how is this different from the Scanner?


In about every way imagineable.

Bufferreader - is this similar to Streaming where it takes a bit of the information at a time?


Nope. It's a stream that allows buffered input, which is usually faster (much faster) than raw input - especially if the data is coming from something like a hard disk. Mostly, it's used for reading lines from text files, since it's one of the few Stream classes that has a method specifically for that.

And BTW, it's BufferedReader. It may seem nitpicky, but these things are really important in Java.

My suggestion: rather than machine-gun us with a lot of guesses, read the I/O tutorials. It explains about all the different types of streams you're likely to run into. If you THEN have any queries, come back with something more specific, and we'll be happy to help.

Winston

PS: These Stream classes should not be confused with the new "Streams" available in version 8.
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic