wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes About java.io Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About java.io" Watch "About java.io" New topic
Author

About java.io

Jack Lau
Ranch Hand

Joined: Aug 30, 2002
Posts: 166
Could anyone tell me what is mean by filtering in the java.io ?
(e.g if I use BufferedInputStream chain with FileInputStream) why is it
called filtering ? filter what ?
it just read data from a file and what is actually filtered even
BufferedInputStream is extends FilterInputStream !
john guthrie
Ranch Hand

Joined: Aug 05, 2002
Posts: 124
i wouldn't get wrapped up in the term "filter". what classes like BufferedInputStream are is actually "decorators" (see a patterns reference if you don't know about decorators).
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
You may want to take a look at the "Working with Filter Streams" section of the I/O lesson of Sun's Java Tutorial.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Jack Lau
Ranch Hand

Joined: Aug 30, 2002
Posts: 166
Originally posted by Dirk Schreckmann:
You may want to take a look at the "Working with Filter Streams" section of the I/O lesson of Sun's Java Tutorial.

Is that mean filter something is to do some work just like buffering, converting data to another format, etc ?
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
The first paragraph of the aforementioned reference should answer your question.
Some streams buffer the data, some count data as it goes by, and others convert data to another form.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About java.io
 
Similar Threads
How to handle deleted records after find
Import Problem from K&B
FIFO implementation in Java
orion server, servelet chaining
servlet filtering