This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 15002
    
  27

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: 44616
    
  34
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: 969
    
    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 ?
 
It's not a secret anymore!