|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteap.filter.Filter
Holds information about a filter. Note that this class does not actually
implement the filter. That is done in a separate class whose name is known
by this class. Such a class must be a subclass of java.io.InputStream, and
must have a constructor: Class(java.io.InputStream) or
Class(java.io.InputStream, String). If it has both constructors, then only the
former will be used. The latter constructor is used if the filter
requires a parameter, such as an encryption key.
Note that the implementation class is not loaded until a user calls
instantiate(InputStream, PasswordProvider).
| Constructor Summary | |
Filter(String ending,
String classname,
String name)
Construct a new Filter object. |
|
| Method Summary | |
String |
getEnding()
Returns the filename extension for this filter |
String |
getName()
Returns the human-readable name of the filter |
InputStream |
instantiate(InputStream in,
PasswordProvider password)
Create an instance of the implementation class for this filter. |
String |
toString()
Returns a string representation of this filter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Filter(String ending,
String classname,
String name)
ending - The file name ending for which this filter is appropriate.classname - The fully qalified name of the class which implements
this filter.name - A human readable name for this filter.| Method Detail |
public String getEnding()
public String getName()
public InputStream instantiate(InputStream in,
PasswordProvider password)
throws FilterException
in - The stream to be filtered. This is passed to the implementation
class's constructor.password - a source of password information in case we need one.
This can be null if we know we won't need a password. The password
obtained from this provider may be passed to the implementation class's
constructor, if need be.
FilterExceptionpublic String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||