public class SaajStaxWriterEx extends SaajStaxWriter implements XMLStreamWriterEx, MtomStreamWriter
| Modifier and Type | Field and Description |
|---|---|
protected static String |
href |
protected static String |
Include |
protected static String |
xopNS |
Body, currentElement, deferredElement, Envelope, envURI, Header, soap, xmlns| Constructor and Description |
|---|
SaajStaxWriterEx(SOAPMessage msg,
String uri) |
| Modifier and Type | Method and Description |
|---|---|
AttachmentMarshaller |
getAttachmentMarshaller() |
NamespaceContextEx |
getNamespaceContext() |
void |
writeAttribute(String prefix,
String ns,
String ln,
String value) |
void |
writeBinary(byte[] data,
int offset,
int length,
String contentType)
Write the binary data.
|
void |
writeBinary(DataHandler data)
Writes the binary data.
|
OutputStream |
writeBinary(String arg0)
Writes the binary data.
|
void |
writeEndElement() |
void |
writePCDATA(CharSequence arg0)
Writes like
XMLStreamWriter.writeCharacters(String) but hides
actual data format. |
void |
writeStartElement(String prefix,
String ln,
String ns) |
close, flush, getEnvelope, getPrefix, getProperty, getSOAPMessage, setDefaultNamespace, setNamespaceContext, setPrefix, writeAttribute, writeAttribute, writeCData, writeCharacters, writeCharacters, writeComment, writeDefaultNamespace, writeDTD, writeEmptyElement, writeEmptyElement, writeEmptyElement, writeEndDocument, writeEntityRef, writeNamespace, writeProcessingInstruction, writeProcessingInstruction, writeStartDocument, writeStartDocument, writeStartDocument, writeStartElement, writeStartElementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, flush, getPrefix, getProperty, setDefaultNamespace, setNamespaceContext, setPrefix, writeAttribute, writeAttribute, writeCData, writeCharacters, writeCharacters, writeComment, writeDefaultNamespace, writeDTD, writeEmptyElement, writeEmptyElement, writeEmptyElement, writeEndDocument, writeEntityRef, writeNamespace, writeProcessingInstruction, writeProcessingInstruction, writeStartDocument, writeStartDocument, writeStartDocument, writeStartElement, writeStartElementprotected static final String xopNS
protected static final String Include
protected static final String href
public SaajStaxWriterEx(SOAPMessage msg, String uri) throws SOAPException
SOAPExceptionpublic void writeStartElement(String prefix, String ln, String ns) throws XMLStreamException
writeStartElement in interface XMLStreamWriterwriteStartElement in class SaajStaxWriterXMLStreamExceptionpublic void writeEndElement()
throws XMLStreamException
writeEndElement in interface XMLStreamWriterwriteEndElement in class SaajStaxWriterXMLStreamExceptionpublic void writeAttribute(String prefix, String ns, String ln, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterwriteAttribute in class SaajStaxWriterXMLStreamExceptionpublic NamespaceContextEx getNamespaceContext()
XMLStreamWriterExgetNamespaceContext in interface XMLStreamWritergetNamespaceContext in interface XMLStreamWriterExgetNamespaceContext in class SaajStaxWriterpublic void writeBinary(DataHandler data) throws XMLStreamException
XMLStreamWriterEx
This method works like the XMLStreamWriterEx.writeBinary(byte[], int, int, String) method,
except that it takes the binary data in the form of DataHandler, which
contains a MIME type (DataHandler.getContentType() as well as the payload
DataHandler.getInputStream().
writeBinary in interface XMLStreamWriterExdata - always non-null. After this method call, the callee owns the data handler.XMLStreamExceptionpublic OutputStream writeBinary(String arg0) throws XMLStreamException
XMLStreamWriterEx
This version of the writeBinary method allows the caller to produce
the binary data by writing it to OutputStream.
It is the caller's responsibility to write and close
a stream before it invokes any other methods on XMLStreamWriter.
TODO: experimental. appreciate feedback
writeBinary in interface XMLStreamWriterExarg0 - See the content-type parameter of
XMLStreamWriterEx.writeBinary(byte[], int, int, String). Must not be null.OutputStream.XMLStreamExceptionpublic void writeBinary(byte[] data,
int offset,
int length,
String contentType)
throws XMLStreamException
XMLStreamWriterExConceptually (infoset-wise), this produces the base64-encoded binary data on the output. But this allows implementations like FastInfoset or XOP to do the smart thing.
The use of this method has some restriction to support XOP. Namely, this method must be invoked as a sole content of an element.
(data,start,len) triplet identifies the binary data to be written. After the method invocation, the callee owns the buffer.
writeBinary in interface XMLStreamWriterExcontentType - this mandatory parameter identifies the MIME type of the binary data.
If the MIME type isn't known by the caller, "application/octet-stream" can
be always used to indicate "I don't know." Never null.XMLStreamExceptionpublic void writePCDATA(CharSequence arg0) throws XMLStreamException
XMLStreamWriterExXMLStreamWriter.writeCharacters(String) but hides
actual data format.writePCDATA in interface XMLStreamWriterExarg0 - The CharSequence that represents the
character infoset items to be written.
The CharSequence is normally a String,
but can be any other CharSequence implementation.
For binary data, however, use of Base64Data is
recommended (so that the consumer interested in seeing it
as binary data may take advantage of mor efficient
data representation.)
XMLStreamExceptionpublic AttachmentMarshaller getAttachmentMarshaller()
getAttachmentMarshaller in interface MtomStreamWriterCopyright © 2005–2017 Oracle Corporation. All rights reserved.