- Byte-based stream
- Class InputStream: This abstract class is the superclass of all classes representing an input stream of bytes.
- Class FilterInputStream: A
FilterInputStream
contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality. The classFilterInputStream
itself simply overrides all methods ofInputStream
with versions that pass all requests to the contained input stream. Subclasses ofFilterInputStream
may further override some of these methods and may also provide additional methods and fields.ClassFilterInputStream is a abstract decorator of InputStream ,Let's see the the design patterns :Decorator. - so ,we can do like this: new DataInputStream(new FileInputStream (xx.xxx)) . clearly decorator pattern.