• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between file and stream in IOStreams ?

 
siva chaitanya
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain me with an example
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 972
5
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic