aspose file tools
The moose likes I/O and Streams and the fly likes Filter Streams Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Filter Streams" Watch "Filter Streams" New topic

Filter Streams

prasad bhn

Joined: May 04, 2001
Posts: 28
what is the "filtering" concept in the filter streams of java
like DataInput/DataOutput Streams and BufferedInput/Output Stream.
can anybody explain the concept of "filtering" in the above streams..
- prasadbh.

prasad bhuvanam
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9056
The basic idea of a data filter is that it takes in some type (like bytes) and transforms them to some other type (like characters) (Input Stream Filter) and vice-versa (Output Stream Filter).

In other words, the idea behind an InputStream filter is to provide a way to modify the data from an InputStream and pass it to another class by using the basic InputStream methods. You could create a filter that converted all lowercase characters to uppercase, for instance.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
It is sorta covered in the JavaRanch Style Guide.
subject: Filter Streams