org.apache.axiom.om.impl
Class MIMEOutputUtils

java.lang.Object
  extended by org.apache.axiom.om.impl.MIMEOutputUtils

public class MIMEOutputUtils
extends Object

Utility class used to write out XML with Attachments

See Also:
MTOMXMLStreamWriter

Constructor Summary
MIMEOutputUtils()
           
 
Method Summary
static void complete(OutputStream outStream, byte[] xmlData, LinkedList binaryNodeList, String boundary, String contentId, String charSetEncoding, String SOAPContentType)
          Deprecated. use OMMultipartWriter instead
static void complete(OutputStream outStream, byte[] xmlData, LinkedList binaryNodeList, String boundary, String contentId, String charSetEncoding, String SOAPContentType, OMOutputFormat omOutputFormat)
          Deprecated. use OMMultipartWriter instead
static MimeBodyPart createMimeBodyPart(String contentID, DataHandler dataHandler)
           
static MimeBodyPart createMimeBodyPart(String contentID, DataHandler dataHandler, OMOutputFormat omOutputFormat)
           
static void finishWritingMime(OutputStream outStream)
           
static void startWritingMime(OutputStream outStream, String boundary)
           
static void writeBodyPart(OutputStream outStream, MimeBodyPart part, String boundary)
          Writes a CRLF for the earlier boundary then the BodyPart data with headers followed by boundary.
static void writeDataHandlerWithAttachmentsMessage(DataHandler rootDataHandler, String contentType, OutputStream outputStream, Map attachments, OMOutputFormat format)
           
static void writeDataHandlerWithAttachmentsMessage(DataHandler rootDataHandler, String contentType, OutputStream outputStream, Map attachments, OMOutputFormat format, Collection ids)
           
static void writeMimeBoundary(OutputStream outStream, String boundary)
           
static void writeMM7Message(StringWriter writer, OutputStream outputStream, Attachments attachments, OMOutputFormat format, String innerPartCID, String innerBoundary)
          Pack all the attachments in to a multipart/related MIME part and attachs it as the second MIME Part of MIME message
static void writeSOAPWithAttachmentsMessage(StringWriter writer, OutputStream outputStream, Attachments attachments, OMOutputFormat format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MIMEOutputUtils

public MIMEOutputUtils()
Method Detail

complete

public static void complete(OutputStream outStream,
                            byte[] xmlData,
                            LinkedList binaryNodeList,
                            String boundary,
                            String contentId,
                            String charSetEncoding,
                            String SOAPContentType)
Deprecated. use OMMultipartWriter instead


complete

public static void complete(OutputStream outStream,
                            byte[] xmlData,
                            LinkedList binaryNodeList,
                            String boundary,
                            String contentId,
                            String charSetEncoding,
                            String SOAPContentType,
                            OMOutputFormat omOutputFormat)
Deprecated. use OMMultipartWriter instead


createMimeBodyPart

public static MimeBodyPart createMimeBodyPart(String contentID,
                                              DataHandler dataHandler)
                                       throws MessagingException
Throws:
MessagingException

createMimeBodyPart

public static MimeBodyPart createMimeBodyPart(String contentID,
                                              DataHandler dataHandler,
                                              OMOutputFormat omOutputFormat)
                                       throws MessagingException
Throws:
MessagingException

writeMimeBoundary

public static void writeMimeBoundary(OutputStream outStream,
                                     String boundary)
                              throws IOException
Throws:
IOException - This will write the boundary to output Stream

startWritingMime

public static void startWritingMime(OutputStream outStream,
                                    String boundary)
                             throws IOException
Throws:
IOException - This will write the boundary with CRLF

writeBodyPart

public static void writeBodyPart(OutputStream outStream,
                                 MimeBodyPart part,
                                 String boundary)
                          throws IOException,
                                 MessagingException
Writes a CRLF for the earlier boundary then the BodyPart data with headers followed by boundary. Writes only the boundary. No more CRLF's are written after that.

Throws:
IOException
MessagingException

finishWritingMime

public static void finishWritingMime(OutputStream outStream)
                              throws IOException
Throws:
IOException - This will write "--" to the end of last boundary

writeSOAPWithAttachmentsMessage

public static void writeSOAPWithAttachmentsMessage(StringWriter writer,
                                                   OutputStream outputStream,
                                                   Attachments attachments,
                                                   OMOutputFormat format)

writeDataHandlerWithAttachmentsMessage

public static void writeDataHandlerWithAttachmentsMessage(DataHandler rootDataHandler,
                                                          String contentType,
                                                          OutputStream outputStream,
                                                          Map attachments,
                                                          OMOutputFormat format)

writeDataHandlerWithAttachmentsMessage

public static void writeDataHandlerWithAttachmentsMessage(DataHandler rootDataHandler,
                                                          String contentType,
                                                          OutputStream outputStream,
                                                          Map attachments,
                                                          OMOutputFormat format,
                                                          Collection ids)

writeMM7Message

public static void writeMM7Message(StringWriter writer,
                                   OutputStream outputStream,
                                   Attachments attachments,
                                   OMOutputFormat format,
                                   String innerPartCID,
                                   String innerBoundary)
Pack all the attachments in to a multipart/related MIME part and attachs it as the second MIME Part of MIME message

Parameters:
writer -
outputStream -
attachments -
format -
innerBoundary -


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.