de.grogra.pf.io
public class StreamAdapter extends SAXFilterBase implements InputStreamSource, OutputStreamSource, ReaderSource, WriterSource, FileWriterSource, DOMSource, VirtualFileWriterSource
FilterSource.MetaDataKey<V>LEX_HANDLERitem, sourceAUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URLNAMESPACE_PREFIXES, NAMESPACESDEFAULT_VALUE, EMPTY_MAP| Constructor and Description |
|---|
StreamAdapter(FilterSource source,
IOFlavor targetFlavor) |
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Document |
getDocument()
Returns the data as a DOM document.
|
boolean |
getFeature(java.lang.String name) |
java.io.InputStream |
getInputStream()
Returns a stream to obtain the data as a stream of bytes.
|
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. |
static void |
write(OutputStreamSource src,
java.io.File out) |
void |
write(java.io.Writer out)
This method writes the data to
out. |
static void |
write(WriterSource src,
java.io.File out) |
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getProperty, parse, parse, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setPropertyget, 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 StreamAdapter(FilterSource source, IOFlavor targetFlavor)
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 SAXSourcegetFeature in interface org.xml.sax.XMLReadergetFeature in class SAXFilterBaseorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
InputStreamSourcegetInputStream in interface InputStreamSourcejava.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 SAXSourcesetFeature in interface org.xml.sax.XMLReadersetFeature in class SAXFilterBaseorg.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 static void write(OutputStreamSource src, java.io.File out) throws java.io.IOException
java.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.IOExceptionpublic static void write(WriterSource src, java.io.File out) throws java.io.IOException
java.io.IOException