O'Reilly logo

Java™ Network Programming and Distributed Computing by Michael Reilly, David Reilly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.3. Filter Streams

While the basic low-level streams provide a simple mechanism to read and write bytes of information, their flexibility is limited. After all, reading bytes is complex (for people, at least), and there's more to the world that just bytes of data. Text, for example, is a sequence of characters, and other forms of data like numbers take up more than a single byte. Byte-level communication can also be inefficient, and data buffering can improve performance. To overcome these limitations, filter streams are used.

Filter streams add additional functionality to an existing stream, by processing data in some form (such as buffering for performance) or offering additional methods that allow data to be accessed in a different manner ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required