de.grogra.pf.io
public abstract class LazyFilter extends FilterBase implements InputStreamSource, OutputStreamSource, ReaderSource, WriterSource, FileReaderSource, FileWriterSource, ObjectSource, SAXSource, DOMSource, Configurable, VirtualFileReaderSource, VirtualFileWriterSource
FilterSource.MetaDataKey<V>item, sourceNAMESPACE_PREFIXES, NAMESPACESAUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URLDEFAULT_VALUE, EMPTY_MAP| Constructor and Description |
|---|
LazyFilter(FilterItem item,
FilterSource source,
IOFlavor flavor) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfigurations(ConfigurationSet set)
This method is invoked to obtain the configurable options of this
Configurable object. |
protected abstract FilterSource |
createFilterSource() |
org.w3c.dom.Document |
getDocument()
Returns the data as a DOM document.
|
boolean |
getFeature(java.lang.String name) |
java.lang.Object |
getFile()
Returns the file from which the data can be obtained.
|
FileSystem |
getFileSystem()
Returns the file system in which the file is contained.
|
protected FilterSource |
getFilterSource() |
java.io.File |
getInputFile()
Returns the file from which the data can be obtained.
|
java.io.InputStream |
getInputStream()
Returns a stream to obtain the data as a stream of bytes.
|
java.lang.Object |
getObject()
Returns the data as an object of a class which is compatible which
the flavor.
|
java.io.Reader |
getReader()
Returns a reader to obtain the data as a stream of characters.
|
long |
length()
Returns the total number of bytes of this stream.
|
void |
parse(org.xml.sax.ContentHandler ch,
org.xml.sax.ErrorHandler eh,
org.xml.sax.ext.LexicalHandler lh,
org.xml.sax.DTDHandler dh,
org.xml.sax.EntityResolver er) |
void |
setFeature(java.lang.String name,
boolean value) |
void |
write(java.io.File out)
This method writes the data to
out. |
void |
write(FileSystem fs,
java.lang.Object out)
This method writes the data to
out. |
void |
write(java.io.OutputStream out)
This method writes the data to
out. |
void |
write(java.io.Writer out)
This method writes the data to
out. |
get, getFilter, getFlavor, getImpl, getMetaData, getRegistry, getSource, getSystemId, initProgressMonitor, setFlavor, setMetaData, setMetaData, setProgress, setSystemId, toString, toURLclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFilter, getFlavor, getMetaData, getSystemId, initProgressMonitor, setMetaData, setProgressgetRegistrypublic LazyFilter(FilterItem item, FilterSource source, IOFlavor flavor)
public void addConfigurations(ConfigurationSet set)
ConfigurableConfigurable object. The method has to add all
Configurations of this object to the specified set.addConfigurations in interface Configurableset - a set to which configurations of this object are addedprotected abstract FilterSource createFilterSource()
public org.w3c.dom.Document getDocument()
throws java.io.IOException,
org.w3c.dom.DOMException
DOMSourcegetDocument in interface DOMSourcejava.io.IOExceptionorg.w3c.dom.DOMExceptionpublic boolean getFeature(java.lang.String name)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
getFeature in interface SAXSourceorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic java.lang.Object getFile()
VirtualFileReaderSourcegetFile in interface VirtualFileReaderSourcepublic FileSystem getFileSystem()
VirtualFileReaderSourcegetFileSystem in interface VirtualFileReaderSourceprotected final FilterSource getFilterSource()
public java.io.File getInputFile()
FileReaderSourcegetInputFile in interface FileReaderSourcepublic java.io.InputStream getInputStream()
throws java.io.IOException
InputStreamSourcegetInputStream in interface InputStreamSourcejava.io.IOExceptionpublic java.lang.Object getObject()
throws java.io.IOException
ObjectSourcegetObject in interface ObjectSourcejava.io.IOExceptionpublic java.io.Reader getReader()
throws java.io.IOException
ReaderSourcegetReader in interface ReaderSourcejava.io.IOExceptionpublic long length()
InputStreamSourcelength in interface InputStreamSourcepublic void parse(org.xml.sax.ContentHandler ch,
org.xml.sax.ErrorHandler eh,
org.xml.sax.ext.LexicalHandler lh,
org.xml.sax.DTDHandler dh,
org.xml.sax.EntityResolver er)
throws java.io.IOException,
org.xml.sax.SAXException
public void setFeature(java.lang.String name,
boolean value)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
setFeature in interface SAXSourceorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic void write(java.io.File out)
throws java.io.IOException
FileWriterSourceout.write in interface FileWriterSourceout - the file to which data is writtenjava.io.IOExceptionpublic void write(FileSystem fs, java.lang.Object out) throws java.io.IOException
VirtualFileWriterSourceout.write in interface VirtualFileWriterSourcefs - the file system to which data is writtenout - the file to which data is writtenjava.io.IOExceptionpublic void write(java.io.OutputStream out)
throws java.io.IOException
OutputStreamSourceout.write in interface OutputStreamSourceout - the stream to which data is writtenjava.io.IOExceptionpublic void write(java.io.Writer out)
throws java.io.IOException
WriterSourceout.write in interface WriterSourceout - the writer to which data is writtenjava.io.IOException