Java Reference
In-Depth Information
chain. In this example, a compressed, encrypted text file arrives from the local network
interface, where native code presents it to the undocumented
TelnetInputStream
. A
BufferedInputStream
buffers the data to speed up the entire process. A
CipherInput
Stream
decrypts the data. A
GZIPInputStream
decompresses the deciphered data. An
InputStreamReader
converts the decompressed data to Unicode text. Finally, the text
is read into the application and processed.
Figure 2-2. The flow of data through a chain of filters
Every filter output stream has the same
write()
,
close()
, and
flush()
methods as
java.io.OutputStream
. Every filter input stream has the same
read()
,
close()
, and