|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.util.xml.XMLStreamWriterFilter
com.sun.xml.ws.encoding.MtomCodec.MtomStreamWriterImpl
public static class MtomCodec.MtomStreamWriterImpl
| Field Summary |
|---|
| Fields inherited from class com.sun.xml.ws.util.xml.XMLStreamWriterFilter |
|---|
writer |
| Constructor Summary | |
|---|---|
MtomCodec.MtomStreamWriterImpl(XMLStreamWriter w,
List<MtomCodec.ByteArrayBuffer> mtomAttachments,
String b,
MTOMFeature myMtomFeature)
|
|
| Method Summary | |
|---|---|
AttachmentMarshaller |
getAttachmentMarshaller()
JAXBMessage writes envelope directly to the OutputStream(for SJSXP, woodstox). |
String |
getEncoding()
|
List<MtomCodec.ByteArrayBuffer> |
getMtomAttachments()
|
NamespaceContextEx |
getNamespaceContext()
|
Object |
getProperty(String name)
|
void |
writeBinary(byte[] data,
int start,
int len,
String contentType)
Write the binary data. |
void |
writeBinary(DataHandler dataHandler)
Writes the binary data. |
OutputStream |
writeBinary(String contentType)
Writes the binary data. |
void |
writePCDATA(CharSequence data)
Writes like XMLStreamWriter.writeCharacters(String) but hides
actual data format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MtomCodec.MtomStreamWriterImpl(XMLStreamWriter w,
List<MtomCodec.ByteArrayBuffer> mtomAttachments,
String b,
MTOMFeature myMtomFeature)
| Method Detail |
|---|
public void writeBinary(byte[] data,
int start,
int len,
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.
XMLStreamException
public void writeBinary(DataHandler dataHandler)
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 XMLStreamWriterExdataHandler - always non-null. After this method call, the callee owns the data handler.
XMLStreamException
public OutputStream writeBinary(String contentType)
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 XMLStreamWriterExcontentType - See the content-type parameter of
XMLStreamWriterEx.writeBinary(byte[], int, int, String). Must not be null.
OutputStream.
XMLStreamException
public void writePCDATA(CharSequence data)
throws XMLStreamException
XMLStreamWriterExXMLStreamWriter.writeCharacters(String) but hides
actual data format.
writePCDATA in interface XMLStreamWriterExdata - 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.)
XMLStreamException
public Object getProperty(String name)
throws IllegalArgumentException
getProperty in interface XMLStreamWritergetProperty in class XMLStreamWriterFilterIllegalArgumentExceptionpublic AttachmentMarshaller getAttachmentMarshaller()
getAttachmentMarshaller in interface MtomStreamWriterpublic List<MtomCodec.ByteArrayBuffer> getMtomAttachments()
public String getEncoding()
getEncoding in interface HasEncodingpublic NamespaceContextEx getNamespaceContext()
XMLStreamWriterEx
getNamespaceContext in interface XMLStreamWritergetNamespaceContext in interface XMLStreamWriterExgetNamespaceContext in class XMLStreamWriterFilter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||