File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "diff. Bw streams" Watch "diff. Bw streams" New topic

diff. Bw streams

selva thalapathy

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 me guys
Pat Farrell

Joined: Aug 11, 2007
Posts: 4659

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: 15081

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

Joined: Oct 13, 2005
Posts: 46337
And welcome to the Ranch
I agree. Here's the link:
subject: diff. Bw streams
It's not a secret anymore!