API Changes Affecting Input and Output Streams
API Changes Affecting Input and Output Streams
The java.io package has been extended with character
streams, which are like byte streams except that they contain 16-bit
Unicode characters rather than eight-bit bytes. Character streams
make it easy to write programs that are not dependent upon a specific
character encoding, and are therefore easy to internationalize.
Nearly all of the functionality available for byte streams is also
available for character streams.
Input and Output Streams
Most programmers using JDK 1.1 should use the new character-stream
classes for doing I/O. See
1.1 Changes: java.io Package.
Your First Encounter with I/O in Java
In JDK 1.1, textual program output should be written by a
PrintWriter. See
1.1 Changes: Textual Program Output.
Overview of Input and Output Streams
Classes were added to the java.io package
to support reading and writing 16-bit Unicode characters.
See
1.1 Changes: java.io Package.
Using Input and Output Streams
Most JDK 1.1 programmers should use the new character-stream
classes. See 1.1 Changes: New Classes.
Using Streams to Implement Pipes
Most JDK 1.1 programmers should use the new PipedReader and PipedWriter
classes. See 1.1 Changes: Pipes.
Using Streams to Read and Write Files
Most JDK 1.1 programmers should use the new FileReader and FileWriter
classes. See 1.1 Changes: File I/O.
Using Streams to Read and Write Memory Locations
Most JDK 1.1 programmers should use the new character-stream
classes. See 1.1 Changes: Memory I/O.
Using Streams to Concatenate Files
JDK 1.1 does not provide a character-stream alternative
to the SequenceInputStream byte-stream.
Working with Filtered Streams
Most JDK 1.1 programmers should use the new character-stream
classes. See 1.1 Changes: Filtered Streams.
Using DataInputStream and DataOutputStream
The DataInputStream.readLine has been deprecated.
See 1.1 Changes: Data I/O.
Writing Your Own Filtered Streams
Because the CheckSum example uses bytes, it should not be
modified to use the new character-stream classes.
Writing Filters for Random Access Files
Because the CheckSum example uses bytes, it should not be
modified to use the new character-stream classes.