Input and Output Streams

Streams is the term used for reading and writing of information to an object, audio, OS pipe command, and file. This section focuses on the reading and writing of files using the many different stream classes. The stream for objects will be covered in the “Object Serialization” section later in the chapter. The streams for audio and piping will not be covered.

Streams flow in a single direction from one entity to another. To read and write from one entity to another requires two streams: one stream for reading and one stream for writing.

The System package has a predefined input stream, output stream, and error stream. The predefined streams are System.in, System.out, and System.err. System.in represents an input stream ...

Get Borland® JBuilder™ Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.