|
Nux 1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnux.xom.sandbox.StaxFilteredStreamWriter
nux.xom.sandbox.StaxFragmentStreamWriter
public final class StaxFragmentStreamWriter
StAX XMLStreamWriter that delegates all calls to the given underlying child
writer, except that calls to all close,
writeStartDocument and writeEndDocument
flavours are silently ignored.
Consider SOAP frameworks (or similar), where the framework writes the SOAP
header to an XMLStreamWriter, and the application writes the SOAP body (i.e.
a fragment aka element subtree) via a StreamingSerializer
to the same XMLStreamWriter. The application needs a way to write a fragment
without writing START_DOCUMENT and END_DOCUMENT events, but
StreamingSerializer doesn't really allow that, in order to ensure
wellformedness.
This class enables StreamingSerializer applications to do just that, without requiring weird and unsafe extensions to the StreamingSerializer interface.
| Constructor Summary | |
|---|---|
StaxFragmentStreamWriter(XMLStreamWriter child)
Constructs an instance that delegates to the given child writer. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
writeEndDocument()
|
void |
writeStartDocument()
|
void |
writeStartDocument(String version)
|
void |
writeStartDocument(String encoding,
String version)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StaxFragmentStreamWriter(XMLStreamWriter child)
child - the writer to delegate to| Method Detail |
|---|
public void close()
throws XMLStreamException
StaxFilteredStreamWriter
close in interface XMLStreamWriterclose in class StaxFilteredStreamWriterXMLStreamException
public void writeEndDocument()
throws XMLStreamException
StaxFilteredStreamWriter
writeEndDocument in interface XMLStreamWriterwriteEndDocument in class StaxFilteredStreamWriterXMLStreamException
public void writeStartDocument()
throws XMLStreamException
StaxFilteredStreamWriter
writeStartDocument in interface XMLStreamWriterwriteStartDocument in class StaxFilteredStreamWriterXMLStreamException
public void writeStartDocument(String version)
throws XMLStreamException
StaxFilteredStreamWriter
writeStartDocument in interface XMLStreamWriterwriteStartDocument in class StaxFilteredStreamWriterXMLStreamException
public void writeStartDocument(String encoding,
String version)
throws XMLStreamException
StaxFilteredStreamWriter
writeStartDocument in interface XMLStreamWriterwriteStartDocument in class StaxFilteredStreamWriterXMLStreamException
|
Nux 1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||