|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axiom.om.impl.OMMultipartWriter
public class OMMultipartWriter
Writes a MIME multipart package as used by XOP/MTOM and SOAP with Attachments. This class wraps a
MultipartWriter
, providing a higher level API. In particular it will configure content
types and content transfer encodings based on information from an OMOutputFormat
object.
Constructor Summary | |
---|---|
OMMultipartWriter(OutputStream out,
OMOutputFormat format)
|
Method Summary | |
---|---|
void |
complete()
Complete writing of the MIME multipart package. |
String |
getRootPartContentType()
Get the content type of the root part, as determined by the OMOutputFormat passed
to the constructor of this object. |
void |
writePart(DataHandler dataHandler,
String contentID)
Write a MIME part. |
OutputStream |
writePart(String contentType,
String contentID)
Start writing an attachment part of the MIME package. |
OutputStream |
writeRootPart()
Start writing the root part of the MIME package. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OMMultipartWriter(OutputStream out, OMOutputFormat format)
Method Detail |
---|
public String getRootPartContentType()
OMOutputFormat
passed
to the constructor of this object.
public OutputStream writeRootPart() throws IOException
MultipartWriter.writePart(String, String, String)
, but computes the content type,
content transfer encoding and content ID from the OMOutputFormat
.
IOException
- if an I/O error occurs when writing to the underlying streampublic OutputStream writePart(String contentType, String contentID) throws IOException
MultipartWriter.writePart(String, String, String)
, but computes the content transfer
encoding based on the content type and the OMOutputFormat
.
contentType
- the content type of the MIME part to writecontentID
- the content ID of the MIME part
IOException
- if an I/O error occurs when writing to the underlying streampublic void writePart(DataHandler dataHandler, String contentID) throws IOException
MultipartWriter.writePart(DataHandler, String, String)
, but computes the appropriate
content transfer encoding from the OMOutputFormat
.
dataHandler
- the content of the MIME part to writecontentID
- the content ID of the MIME part
IOException
- if an I/O error occurs when writing the part to the underlying streampublic void complete() throws IOException
MultipartWriter.complete()
.
IOException
- if an I/O error occurs when writing to the underlying stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |