Top Description Fields Constructors Methods
org.dom4j.io

pack-priv Class DocumentInputSource

extends InputSource
Class Inheritance
Imports
java.io.IOException, .Reader, .StringReader, .StringWriter, org.dom4j.Document, org.xml.sax.InputSource

DocumentInputSource implements a SAX InputSourcefor a Document.

Author
James Strachan
Version
$Revision: 1.8 $

Field Summary

Modifier and TypeField and Description
private Document
document

The document source

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Reader

Returns:

DOCUMENT ME!
getCharacterStream
()

Overrides org.xml.sax.InputSource.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.
public Document

Returns:

the document which is being used as the SAX InputSource
getDocument
()

DOCUMENT ME!

public void
setCharacterStream(Reader
DOCUMENT ME!
characterStream
)

Overrides org.xml.sax.InputSource.setCharacterStream.

This method is not supported as this source is always a Document instance.
public void
setDocument(Document
DOCUMENT ME!
document
)

Sets the document used as the SAX InputSource

Inherited from org.xml.sax.InputSource:
getByteStreamgetEncodinggetPublicIdgetSystemIdisEmptysetByteStreamsetEncodingsetPublicIdsetSystemId

Field Detail

documentback to summary
private Document document

The document source

Constructor Detail

DocumentInputSourceback to summary
public DocumentInputSource()
DocumentInputSourceback to summary
public DocumentInputSource(Document document)

Method Detail

getCharacterStreamback to summary
public Reader getCharacterStream()

Overrides org.xml.sax.InputSource.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. Should only be used with care.

Returns:Reader

DOCUMENT ME!

getDocumentback to summary
public Document getDocument()

DOCUMENT ME!

Returns:Document

the document which is being used as the SAX InputSource

setCharacterStreamback to summary
public void setCharacterStream(Reader characterStream) throws UnsupportedOperationException

Overrides org.xml.sax.InputSource.setCharacterStream.

This method is not supported as this source is always a Document instance.

Parameters
characterStream:Reader

DOCUMENT ME!

Exceptions
UnsupportedOperationException:
as this method is unsupported
setDocumentback to summary
public void setDocument(Document document)

Sets the document used as the SAX InputSource

Parameters
document:Document

DOCUMENT ME!