|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openpipeline.pipeline.docfilter.PlainTextFilter
public class PlainTextFilter
A filter for plain text files. The entire file is loaded into an attribute with an attributeId of "text".
| Constructor Summary | |
|---|---|
PlainTextFilter()
|
|
| Method Summary | |
|---|---|
String |
getDescription()
Return a description of this filter suitable for display in the admin interface. |
String |
getErrorMessage()
Return any error message that occurs during the parse process. |
Throwable |
getException()
Return any exception that occurred during parsing. |
String[] |
getExtensions()
Return an array of file extensions that this filter can handle. |
List |
getLinks()
Returns a List of any links found in the document. |
String[] |
getMimeTypes()
Return an array of mimetypes that this filter can handle. |
String |
getName()
Return the name of this filter. |
boolean |
getNextItem(Item item)
Reads data from the input, parses it, and adds it to the the specified item. |
boolean |
hasError()
Returns true if the last call to getNextItem() generated an error. |
void |
setEncoding(String encoding)
Set the encoding of the data in the input stream. |
void |
setExtensions(String[] exts)
Set the extensions that this filter handles. |
void |
setInputStream(InputStream inStream)
Set the input stream which contains the document to be added. |
void |
setMimeTypes(String[] mimeTypes)
Set the mimetypes that this filter handles. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlainTextFilter()
| Method Detail |
|---|
public void setInputStream(InputStream inStream)
DocFilter
setInputStream in interface DocFilterpublic void setEncoding(String encoding)
DocFilter
setEncoding in interface DocFilterencoding - an encoding string, for example, "UTF-8" or "ISO-8859-1". Must
be one supported by the JVM.public boolean getNextItem(Item item)
DocFilter
getNextItem in interface DocFilterpublic List getLinks()
DocFilter
getLinks in interface DocFilterpublic boolean hasError()
DocFilter
hasError in interface DocFilterpublic String getErrorMessage()
DocFilter
getErrorMessage in interface DocFilterpublic Throwable getException()
DocFilter
getException in interface DocFilterpublic String getName()
DocFilter
getName in interface DocFilterpublic String getDescription()
DocFilter
getDescription in interface DocFilterpublic String[] getExtensions()
DocFilter
{"htm", "html", "jsp", "asp"}
getExtensions in interface DocFilterpublic String[] getMimeTypes()
DocFilter
{"text/html", "text/plain"}
Other common mimetypes include application/pdf, application/msword, application/vnd.ms-excel, etc.
getMimeTypes in interface DocFilterpublic void setExtensions(String[] exts)
DocFilter
setExtensions in interface DocFilterexts - extensions this class should handlepublic void setMimeTypes(String[] mimeTypes)
DocFilter
setMimeTypes in interface DocFiltermimeTypes - mimetypes this class should handle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||