aspose file tools
The moose likes I/O and Streams and the fly likes whar is low and high leve streams Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "whar is low and high leve streams" Watch "whar is low and high leve streams" New topic

whar is low and high leve streams


Joined: Mar 31, 2002
Posts: 2
From:asif ail<>
sub: what is streams.
I have question
what is low level stream and, high level stream .
how do i seprate each other.?
Mag Hoehme
Ranch Hand

Joined: Apr 07, 2002
Posts: 194
Low-level streams read directly from the input medium or write directly to the output medium. Eg. a FileInputStream reads raw bytes from a file.
High-level streams are streams that read from or write to other streams. Eg. a BufferedInputStream may be used to read chunks of bytes from a FileInputStream.
The constructor of high-level streams always takes an other stream as an argument; the constructors of low-level streams do never accept streams as arguments.
However, both kinds of streams, low-level as well as high-level streams extend the same abstract superclasses.
In order to use streams, you need to know what the purposes of the individual streams. There is no easy way - you have to learn them.
Please let me know if I'm wrong.

Consider Paul's rocket mass heater.
subject: whar is low and high leve streams