Apache CXF API

org.apache.cxf.attachment
Class AttachmentUtil

java.lang.Object
  extended by org.apache.cxf.attachment.AttachmentUtil

public final class AttachmentUtil
extends java.lang.Object


Field Summary
static java.lang.String BODY_ATTACHMENT_ID
           
 
Method Summary
static Attachment createAttachment(java.io.InputStream stream, javax.mail.internet.InternetHeaders headers)
           
static java.lang.String createContentID(java.lang.String ns)
           
static Attachment createMtomAttachment(boolean isXop, java.lang.String mimeType, java.lang.String elementNS, byte[] data, int offset, int length, int threshold)
           
static Attachment createMtomAttachmentFromDH(boolean isXop, javax.activation.DataHandler handler, java.lang.String elementNS, int threshold)
           
static javax.activation.DataSource getAttachmentDataSource(java.lang.String contentId, java.util.Collection<Attachment> atts)
           
static java.lang.String getAttachmentPartHeader(Attachment att)
           
static javax.activation.CommandMap getCommandMap()
           
static java.util.Map<java.lang.String,javax.activation.DataHandler> getDHMap(java.util.Collection<Attachment> attachments)
           
static java.lang.String getUniqueBoundaryValue()
           
static boolean isTypeSupported(java.lang.String contentType, java.util.List<java.lang.String> types)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BODY_ATTACHMENT_ID

public static final java.lang.String BODY_ATTACHMENT_ID
See Also:
Constant Field Values
Method Detail

getCommandMap

public static javax.activation.CommandMap getCommandMap()

createContentID

public static java.lang.String createContentID(java.lang.String ns)
                                        throws java.io.UnsupportedEncodingException
Parameters:
ns -
Returns:
Throws:
java.io.UnsupportedEncodingException

getUniqueBoundaryValue

public static java.lang.String getUniqueBoundaryValue()

getAttachmentPartHeader

public static java.lang.String getAttachmentPartHeader(Attachment att)

getDHMap

public static java.util.Map<java.lang.String,javax.activation.DataHandler> getDHMap(java.util.Collection<Attachment> attachments)

createAttachment

public static Attachment createAttachment(java.io.InputStream stream,
                                          javax.mail.internet.InternetHeaders headers)
                                   throws java.io.IOException
Throws:
java.io.IOException

isTypeSupported

public static boolean isTypeSupported(java.lang.String contentType,
                                      java.util.List<java.lang.String> types)

createMtomAttachment

public static Attachment createMtomAttachment(boolean isXop,
                                              java.lang.String mimeType,
                                              java.lang.String elementNS,
                                              byte[] data,
                                              int offset,
                                              int length,
                                              int threshold)

createMtomAttachmentFromDH

public static Attachment createMtomAttachmentFromDH(boolean isXop,
                                                    javax.activation.DataHandler handler,
                                                    java.lang.String elementNS,
                                                    int threshold)

getAttachmentDataSource

public static javax.activation.DataSource getAttachmentDataSource(java.lang.String contentId,
                                                                  java.util.Collection<Attachment> atts)

Apache CXF API

Apache CXF