org.apache.cxf.attachment
Class AttachmentUtil
java.lang.Object
org.apache.cxf.attachment.AttachmentUtil
public final class AttachmentUtil
- extends Object
Method Summary |
static Attachment |
createAttachment(InputStream stream,
javax.mail.internet.InternetHeaders headers)
|
static String |
createContentID(String ns)
|
static Attachment |
createMtomAttachment(boolean isXop,
String mimeType,
String elementNS,
byte[] data,
int offset,
int length,
int threshold)
|
static Attachment |
createMtomAttachmentFromDH(boolean isXop,
javax.activation.DataHandler handler,
String elementNS,
int threshold)
|
static javax.activation.DataSource |
getAttachmentDataSource(String contentId,
Collection<Attachment> atts)
|
static String |
getAttachmentPartHeader(Attachment att)
|
static javax.activation.CommandMap |
getCommandMap()
|
static Map<String,javax.activation.DataHandler> |
getDHMap(Collection<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 |
BODY_ATTACHMENT_ID
public static final String BODY_ATTACHMENT_ID
- See Also:
- Constant Field Values
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(Attachment att)
getDHMap
public static Map<String,javax.activation.DataHandler> getDHMap(Collection<Attachment> attachments)
createAttachment
public static 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 Attachment createMtomAttachment(boolean isXop,
String mimeType,
String elementNS,
byte[] data,
int offset,
int length,
int threshold)
createMtomAttachmentFromDH
public static Attachment createMtomAttachmentFromDH(boolean isXop,
javax.activation.DataHandler handler,
String elementNS,
int threshold)
getAttachmentDataSource
public static javax.activation.DataSource getAttachmentDataSource(String contentId,
Collection<Attachment> atts)
Apache CXF