my dog learned polymorphism*
The moose likes Java in General and the fly likes diff. Bw streams Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "diff. Bw streams" Watch "diff. Bw streams" New topic
Author

diff. Bw streams

selva thalapathy
Greenhorn

Joined: Dec 05, 2011
Posts: 1
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

Joined: Aug 11, 2007
Posts: 4646
    
    5

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

Joined: Aug 16, 2005
Posts: 14074
    
  16

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.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37879
    
  22
And welcome to the Ranch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diff. Bw streams
 
Similar Threads
Game development in java
parse( ) of DateFormat
passing information to next page
Access HTML Form name programmatically from Servlet.
List.add() operation terminating program