java.lang.Object
de.grogra.pf.io.FilterSourceBase
de.grogra.pf.io.NullSource
- All Implemented Interfaces:
DOMSource,FileReaderSource,FileWriterSource,FilterSource,InputStreamSource,ObjectSource,OutputStreamSource,ReaderSource,SAXSource,VirtualFileReaderSource,VirtualFileWriterSource,WriterSource,RegistryContext
public final class NullSource
extends FilterSourceBase
implements SAXSource, InputStreamSource, OutputStreamSource, ReaderSource, WriterSource, ObjectSource, DOMSource, FileReaderSource, FileWriterSource, VirtualFileReaderSource, VirtualFileWriterSource
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V> -
Field Summary
Fields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URLFields inherited from interface de.grogra.pf.io.SAXSource
NAMESPACE_PREFIXES, NAMESPACES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.Returns 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.Returns a system id which identifies this source.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.FilterSourceBase
getFilter, getFlavor, getMetaData, getRegistry, initProgressMonitor, setMetaData, setProgress, setProgress0, setProgressImpl, toString, useAutoProgressMethods 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, initProgressMonitor, setMetaData, setProgressMethods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
-
Constructor Details
-
NullSource
-
-
Method Details
-
getSystemId
Description copied from interface:FilterSourceReturns a system id which identifies this source.- Specified by:
getSystemIdin interfaceFilterSource- Returns:
- system id
-
getFeature
- Specified by:
getFeaturein 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
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException - Specified by:
setFeaturein interfaceSAXSource- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
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
-
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
-
getDocument
Description copied from interface:DOMSourceReturns the data as a DOM document.- Specified by:
getDocumentin interfaceDOMSource- Returns:
- the data
- Throws:
IOExceptionDOMException
-
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
-