java.lang.Object
de.grogra.pf.io.FilterBase
de.grogra.pf.io.LazyFilter
- All Implemented Interfaces:
DOMSource,FileReaderSource,FileWriterSource,Filter,FilterSource,InputStreamSource,ObjectSource,OutputStreamSource,ReaderSource,SAXSource,VirtualFileReaderSource,VirtualFileWriterSource,WriterSource,RegistryContext,Configurable,Map
public abstract class LazyFilter
extends FilterBase
implements InputStreamSource, OutputStreamSource, ReaderSource, WriterSource, FileReaderSource, FileWriterSource, ObjectSource, SAXSource, DOMSource, Configurable, VirtualFileReaderSource, VirtualFileWriterSource
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V> -
Field Summary
Fields inherited from class de.grogra.pf.io.FilterBase
item, sourceFields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URLFields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAPFields inherited from interface de.grogra.pf.io.SAXSource
NAMESPACE_PREFIXES, NAMESPACES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is invoked to obtain the configurable options of thisConfigurableobject.protected abstract FilterSourceReturns the data as a DOM document.booleangetFeature(String name) getFile()Returns the file from which the data can be obtained.Returns the file system in which the file is contained.protected final FilterSourceReturns the file from which the data can be obtained.Returns a stream to obtain the data as a stream of bytes.Returns the data as an object of a class which is compatible which the flavor.Returns a reader to obtain the data as a stream of characters.longlength()Returns the total number of bytes of this stream.voidparse(ContentHandler ch, ErrorHandler eh, LexicalHandler lh, DTDHandler dh, EntityResolver er) voidsetFeature(String name, boolean value) voidwrite(FileSystem fs, Object out) This method writes the data toout.voidThis method writes the data toout.voidwrite(OutputStream out) This method writes the data toout.voidThis method writes the data toout.Methods inherited from class de.grogra.pf.io.FilterBase
get, getFilter, getFlavor, getImpl, getMetaData, getRegistry, getSource, getSystemId, initProgressMonitor, setFlavor, setMetaData, setMetaData, setProgress, setSystemId, toString, toURLMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.pf.io.FilterSource
getFilter, getFlavor, getMetaData, getSystemId, initProgressMonitor, setMetaData, setProgressMethods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
-
Constructor Details
-
LazyFilter
-
-
Method Details
-
createFilterSource
-
getFilterSource
-
getInputStream
Description copied from interface:InputStreamSourceReturns a stream to obtain the data as a stream of bytes.- Specified by:
getInputStreamin interfaceInputStreamSource- Returns:
- an input stream for the data
- Throws:
IOException
-
length
public long length()Description copied from interface:InputStreamSourceReturns the total number of bytes of this stream. A negative values indicates that this number is unknown.- Specified by:
lengthin interfaceInputStreamSource- Returns:
- number of bytes
-
write
Description copied from interface:OutputStreamSourceThis method writes the data toout.- Specified by:
writein interfaceOutputStreamSource- Parameters:
out- the stream to which data is written- Throws:
IOException
-
getReader
Description copied from interface:ReaderSourceReturns a reader to obtain the data as a stream of characters.- Specified by:
getReaderin interfaceReaderSource- Returns:
- a reader for the data
- Throws:
IOException
-
write
Description copied from interface:WriterSourceThis method writes the data toout.- Specified by:
writein interfaceWriterSource- Parameters:
out- the writer to which data is written- Throws:
IOException
-
getInputFile
Description copied from interface:FileReaderSourceReturns the file from which the data can be obtained.- Specified by:
getInputFilein interfaceFileReaderSource- Returns:
- file representing the data
-
write
Description copied from interface:FileWriterSourceThis method writes the data toout.- Specified by:
writein interfaceFileWriterSource- Parameters:
out- the file to which data is written- Throws:
IOException
-
getFileSystem
Description copied from interface:VirtualFileReaderSourceReturns the file system in which the file is contained.- Specified by:
getFileSystemin interfaceVirtualFileReaderSource- Returns:
- file system
-
getFile
Description copied from interface:VirtualFileReaderSourceReturns the file from which the data can be obtained.- Specified by:
getFilein interfaceVirtualFileReaderSource- Returns:
- file representing the data
-
write
Description copied from interface:VirtualFileWriterSourceThis method writes the data toout.- Specified by:
writein interfaceVirtualFileWriterSource- Parameters:
fs- the file system to which data is writtenout- the file to which data is written- Throws:
IOException
-
getObject
Description copied from interface:ObjectSourceReturns the data as an object of a class which is compatible which the flavor.- Specified by:
getObjectin interfaceObjectSource- Returns:
- the data
- Throws:
IOException
-
getFeature
- Specified by:
getFeaturein interfaceSAXSource- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException - Specified by:
setFeaturein interfaceSAXSource- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
parse
public void parse(ContentHandler ch, ErrorHandler eh, LexicalHandler lh, DTDHandler dh, EntityResolver er) throws IOException, SAXException - Specified by:
parsein interfaceSAXSource- Throws:
IOExceptionSAXException
-
getDocument
Description copied from interface:DOMSourceReturns the data as a DOM document.- Specified by:
getDocumentin interfaceDOMSource- Returns:
- the data
- Throws:
IOExceptionDOMException
-
addConfigurations
Description copied from interface:ConfigurableThis method is invoked to obtain the configurable options of thisConfigurableobject. The method has to add allConfigurations of this object to the specifiedset.- Specified by:
addConfigurationsin interfaceConfigurable- Parameters:
set- a set to which configurations of this object are added
-