What is a stream?

John Zukowski

Basically, a stream is an ordered look at a sequence of bytes for input or output.

Low-level streams provide direct access to the underlying bytes, like a FileInputStream, FileOutputStream, or CharArrayWriter, where reading and writing work directly with the underlying input/output device. High-level streams, or filters, instead build upon the low-level streams to provide additional capabilities, like buffering, counting lines, compressing data, or reading/writing higher-level data members like primitives or objects. You can chain multiple filters together to get multiple higher-level operations on a single low-level stream.