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_URL
Fields inherited from interface de.grogra.pf.io.SAXSource
NAMESPACE_PREFIXES, NAMESPACES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the data as a DOM document.boolean
getFeature
(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.long
length()
Returns the total number of bytes of this stream.void
parse
(ContentHandler ch, ErrorHandler eh, LexicalHandler lh, DTDHandler dh, EntityResolver er) void
setFeature
(String name, boolean value) void
write
(FileSystem fs, Object out) This method writes the data toout
.void
This method writes the data toout
.void
write
(OutputStream out) This method writes the data toout
.void
This method writes the data toout
.Methods inherited from class de.grogra.pf.io.FilterSourceBase
getFilter, getFlavor, getMetaData, getRegistry, initProgressMonitor, setMetaData, setProgress, setProgress0, setProgressImpl, toString, useAutoProgress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.grogra.pf.io.FilterSource
getFilter, getFlavor, getMetaData, initProgressMonitor, setMetaData, setProgress
Methods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
-
Constructor Details
-
NullSource
-
-
Method Details
-
getSystemId
Description copied from interface:FilterSource
Returns a system id which identifies this source.- Specified by:
getSystemId
in interfaceFilterSource
- Returns:
- system id
-
getFeature
- Specified by:
getFeature
in interfaceSAXSource
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
parse
public void parse(ContentHandler ch, ErrorHandler eh, LexicalHandler lh, DTDHandler dh, EntityResolver er) throws IOException, SAXException - Specified by:
parse
in interfaceSAXSource
- Throws:
IOException
SAXException
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException - Specified by:
setFeature
in interfaceSAXSource
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
getInputStream
Description copied from interface:InputStreamSource
Returns a stream to obtain the data as a stream of bytes.- Specified by:
getInputStream
in interfaceInputStreamSource
- Returns:
- an input stream for the data
- Throws:
IOException
-
length
public long length()Description copied from interface:InputStreamSource
Returns the total number of bytes of this stream. A negative values indicates that this number is unknown.- Specified by:
length
in interfaceInputStreamSource
- Returns:
- number of bytes
-
write
Description copied from interface:OutputStreamSource
This method writes the data toout
.- Specified by:
write
in interfaceOutputStreamSource
- Parameters:
out
- the stream to which data is written- Throws:
IOException
-
getReader
Description copied from interface:ReaderSource
Returns a reader to obtain the data as a stream of characters.- Specified by:
getReader
in interfaceReaderSource
- Returns:
- a reader for the data
- Throws:
IOException
-
write
Description copied from interface:WriterSource
This method writes the data toout
.- Specified by:
write
in interfaceWriterSource
- Parameters:
out
- the writer to which data is written- Throws:
IOException
-
getObject
Description copied from interface:ObjectSource
Returns the data as an object of a class which is compatible which the flavor.- Specified by:
getObject
in interfaceObjectSource
- Returns:
- the data
- Throws:
IOException
-
getDocument
Description copied from interface:DOMSource
Returns the data as a DOM document.- Specified by:
getDocument
in interfaceDOMSource
- Returns:
- the data
- Throws:
IOException
DOMException
-
getInputFile
Description copied from interface:FileReaderSource
Returns the file from which the data can be obtained.- Specified by:
getInputFile
in interfaceFileReaderSource
- Returns:
- file representing the data
-
write
Description copied from interface:FileWriterSource
This method writes the data toout
.- Specified by:
write
in interfaceFileWriterSource
- Parameters:
out
- the file to which data is written- Throws:
IOException
-
getFileSystem
Description copied from interface:VirtualFileReaderSource
Returns the file system in which the file is contained.- Specified by:
getFileSystem
in interfaceVirtualFileReaderSource
- Returns:
- file system
-
getFile
Description copied from interface:VirtualFileReaderSource
Returns the file from which the data can be obtained.- Specified by:
getFile
in interfaceVirtualFileReaderSource
- Returns:
- file representing the data
-
write
Description copied from interface:VirtualFileWriterSource
This method writes the data toout
.- Specified by:
write
in interfaceVirtualFileWriterSource
- Parameters:
fs
- the file system to which data is writtenout
- the file to which data is written
-