File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 4659
    
    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: 14278
    
  21

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 8 API documentation
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
And welcome to the Ranch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diff. Bw streams