15.7 (Optional) Additional java.io Classes

This section overviews additional interfaces and classes (from package java.io).

15.7.1 Interfaces and Classes for Byte-Based Input and Output

InputStream and OutputStream are abstract classes that declare methods for performing byte-based input and output, respectively.

Pipe Streams

Pipes are synchronized communication channels between threads. We discuss threads in Chapter 23. Java provides PipedOutputStream (a subclass of OutputStream) and PipedInputStream (a subclass of InputStream) to establish pipes between two threads in a program. One thread sends data to another by writing to a PipedOutputStream. The target thread reads information from the pipe via a PipedInputStream.

Filter Streams

Get Java How To Program, Late Objects, 11th Edition 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.