Chapter 4
Streams
Along with java.io.File and java.io.RandomAccessFile, Java’s classic I/O infrastructure provides streams for performing I/O operations. A stream is an ordered sequence of bytes of an arbitrary length. Bytes flow over an output stream from an application to a destination and flow over an input stream from a source to an application.
Java provides classes in the java.io package that identify various stream destinations for writing; for example, byte arrays, files, and thread pipes. Java also provides classes in this package that identify various stream sources for reading. Examples include byte arrays, files, and thread pipes. This chapter explores many of these classes.
Stream Classes Overview
The java.io package provides ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access