Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

diff. Bw streams

 
selva thalapathy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..i am new to java..i want the difference bw direct input stream and buffered reader..and where we can apply with real time examples..help me guys
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what you are asking. A BufferedReader is buffered, and had additional methods that take advantage of the buffer.

What, exactly, do you mean by "real time" here?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15490
43
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java has two kinds of classes for I/O: streams and readers/writers.

Streams (InputStream, OutputStream and everything that extends these) are for reading and writing binary data: to read or write bytes from for example a file exactly as they are stored.

Readers and writers are a layer on top of streams, and these are for reading and writing text. Readers and writers convert from raw bytes to and from Unicode characters.

So, use streams when you need to read or write the bytes exactly as they appear in a file, and use readers and writers to read and write text files.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50248
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic