Java Reference
In-Depth Information
Figure 16.3
A sample output of the EchoFile program.
The purpose of a low-level stream is to communicate with a specific data
source. The low-level streams only read in data at the byte level. In other
words, the low-level streams do not provide extra functionality for
performing advanced reading or writing of primitive data types or object
types. This is done using a high-level stream, chaining the low-level
stream to one or more high-level streams.
High-Level Streams
The following is a list of the high-level input and output streams in the java.io
package, as well as a few others in the J2SE:
BufferedInputStream and BufferedOutputStream.
This is used for
buffering input and output.
DataInputStream and DataOutputStream.
This is a filter for writing and
reading primitive data types and Strings.
ObjectInputStream and ObjectOutputStream.
This is used for serializa-
tion and deserialization of Java objects.
PushbackInputStream. This represents a stream that allows data to be
read from the stream, then pushed back into the stream if necessary.
AudioInputStream. This is used for reading audio from an input stream.
This class is in the javax.sound.sampled package.
CheckedInputStream and CheckedOutputStream. This is used for fil-
tering data using a checksum that can be used to verify the data. These
classes are found in the java.util.zip package.
CypherInputStream and CypherOutputStream. This is used for work-
ing with encrypted data. These classes are found in the javax.crypto
package.
Search WWH ::




Custom Search