org.apache.cxf.attachment
Class AttachmentUtil

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

public final class AttachmentUtil
extends Object


Field Summary
static String BODY_ATTACHMENT_ID
           
 
Method Summary
static org.apache.cxf.message.Attachment createAttachment(InputStream stream, javax.mail.internet.InternetHeaders headers)
           
static String createContentID(String ns)
           
static org.apache.cxf.message.Attachment createMtomAttachment(boolean isXop, String mimeType, String elementNS, byte[] data, int offset, int length, int threshold)
           
static org.apache.cxf.message.Attachment createMtomAttachmentFromDH(boolean isXop, javax.activation.DataHandler handler, String elementNS, int threshold)
           
static javax.activation.DataSource getAttachmentDataSource(String contentId, Collection<org.apache.cxf.message.Attachment> atts)
           
static String getAttachmentPartHeader(org.apache.cxf.message.Attachment att)
           
static javax.activation.CommandMap getCommandMap()
           
static Map<String,javax.activation.DataHandler> getDHMap(Collection<org.apache.cxf.message.Attachment> attachments)
           
static String getUniqueBoundaryValue()
           
static boolean isTypeSupported(String contentType, List<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 String BODY_ATTACHMENT_ID
See Also:
Constant Field Values
Method Detail

getCommandMap

public static javax.activation.CommandMap getCommandMap()

createContentID

public static String createContentID(String ns)
                              throws UnsupportedEncodingException
Parameters:
ns -
Returns:
Throws:
UnsupportedEncodingException

getUniqueBoundaryValue

public static String getUniqueBoundaryValue()

getAttachmentPartHeader

public static String getAttachmentPartHeader(org.apache.cxf.message.Attachment att)

getDHMap

public static Map<String,javax.activation.DataHandler> getDHMap(Collection<org.apache.cxf.message.Attachment> attachments)

createAttachment

public static org.apache.cxf.message.Attachment createAttachment(InputStream stream,
                                                                 javax.mail.internet.InternetHeaders headers)
                                                          throws IOException
Throws:
IOException

isTypeSupported

public static boolean isTypeSupported(String contentType,
                                      List<String> types)

createMtomAttachment

public static org.apache.cxf.message.Attachment createMtomAttachment(boolean isXop,
                                                                     String mimeType,
                                                                     String elementNS,
                                                                     byte[] data,
                                                                     int offset,
                                                                     int length,
                                                                     int threshold)

createMtomAttachmentFromDH

public static org.apache.cxf.message.Attachment createMtomAttachmentFromDH(boolean isXop,
                                                                           javax.activation.DataHandler handler,
                                                                           String elementNS,
                                                                           int threshold)

getAttachmentDataSource

public static javax.activation.DataSource getAttachmentDataSource(String contentId,
                                                                  Collection<org.apache.cxf.message.Attachment> atts)


Apache CXF