|
Berkeley DB XML version 2.3.11 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sleepycat.dbxml.XmlEventReaderToWriter
public class XmlEventReaderToWriter
Used to connect XmlEventReader and XmlEventWriter objects,
pushing the events from XmlEventReader to the writer.
You can obtain an instance of XmlEventWriter using
XmlContainer.putDocumentAsEventWriter(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext, com.sleepycat.dbxml.XmlDocumentConfig). You can obtain an
instance of XmlEventReader using a combination of XmlContainer.getDocument(java.lang.String)
and XmlDocument.getContentAsEventReader().
This class provides an efficient mechanism to copy the content from one document to another, directly.
| Constructor Summary | |
|---|---|
XmlEventReaderToWriter(XmlEventReader reader,
XmlEventWriter writer,
boolean ownsReader)
Construct an XmlEventReaderToWriter instance from the parameters. |
|
| Method Summary | |
|---|---|
void |
start()
Perform the operation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlEventReaderToWriter(XmlEventReader reader,
XmlEventWriter writer,
boolean ownsReader)
throws XmlException
XmlEventReaderToWriter instance from the parameters.
reader - The XmlEventReader from which events are read.writer - The XmlEventWriter to which events are written. This object is
always donated, and the caller can no longer use it.ownsReader - Set to true if the reader is donated to the object, which means the
constructed object is responsible for calling XmlEventReader.close().
XmlException| Method Detail |
|---|
public void start()
throws XmlException
XmlEventWriter.close(boolean) and, if ownsReader was true during
construction, XmlEventReader.close().
XmlException
|
Berkeley DB XML version 2.3.11 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||