class DocumentInputSource extends InputSource
DocumentInputSource
implements a SAX InputSource
for a Document
.
Modifier and Type | Field and Description |
---|---|
private Document |
document
The document source
|
Constructor and Description |
---|
DocumentInputSource() |
DocumentInputSource(Document document) |
Modifier and Type | Method and Description |
---|---|
Reader |
getCharacterStream()
Note this method is quite inefficent, it turns the in memory XML tree
object model into a single block of text which can then be read by
other XML parsers.
|
Document |
getDocument() |
void |
setCharacterStream(Reader characterStream)
This method is not supported as this source is always a
Document instance. |
void |
setDocument(Document document)
Sets the document used as the SAX
InputSource |
getByteStream, getEncoding, getPublicId, getSystemId, setByteStream, setEncoding, setPublicId, setSystemId
public DocumentInputSource()
public DocumentInputSource(Document document)
public Document getDocument()
InputSource
public void setDocument(Document document)
InputSource
public void setCharacterStream(Reader characterStream) throws UnsupportedOperationException
Document
instance.setCharacterStream
in class InputSource
characterStream
- The character stream containing the
XML document or other entity.UnsupportedOperationException
- as this method is unsupportedInputSource.getCharacterStream()
,
Reader
public Reader getCharacterStream()
getCharacterStream
in class InputSource
InputSource.setCharacterStream(java.io.Reader)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses