jQuery in Action, 2nd edition*
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
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: 14352
    
  22

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

Joined: Oct 13, 2005
Posts: 39885
    
  28
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: 877
    
    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 ?