wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes difference between file and stream in IOStreams ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "difference between file and stream in IOStreams ?" Watch "difference between file and stream in IOStreams ?" New topic
Author

difference between file and stream in IOStreams ?

siva chaitanya
Ranch Hand

Joined: Jul 05, 2011
Posts: 59
Please explain me with an example
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14114
    
  16

See the API documentation of java.io.File and java.io.InputStream, java.io.OutputStream and subclasses.

Also see Lesson: Basic I/O in Oracle's Java Tutorials.


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: 38474
    
  23
Just as important is the difference between data streams and readers, which you will also find mentioned in the Tutorial link Jesper gave you.
Angus Comber
Ranch Hand

Joined: Jul 16, 2011
Posts: 90
I assume you know what a file is?

A stream, as the name implies, is like a real stream. It is a flow of bytes.

The file may be the 'source' of a stream or the 'destination' of a stream.

You should look on the web generally for file io, redirection, stdin, stdout, stderr, piping, etc.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Angus Comber wrote:
You should look on the web generally for file io, redirection, stdin, stdout, stderr, piping, etc.


All the world is but a stage, er, a file ;-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference between file and stream in IOStreams ?