From Java Tutorial 98- 4: Multi-Treading, Useful Java Classes, I/O and Networking NAVO Tutorial -- Sept 23 1998. byGeoffrey C. Fox, Nancy McCracken
Subclasses of FilterInputStream are used to convert a raw InputStream to one with added value. You can define your own filters but useful ones are already provided in java.io:
BufferedInputStream -- establishes an intermediate buffer to service the stream
DataInputStream -- has methods to input other data types besides bytes (char, double, boolean, etc.)
PushbackInputStream -- allows one to "unread" a byte and put it back in the input stream
These streams may be "chained" for added functionality:
DataInputStream in =
new DataInputStream (new FileInputStream(file));
or
BufferedInputStream in =
new BufferedInputStream (new FileInputStream(file));