public final class AttachmentUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BODY_ATTACHMENT_ID |
Modifier and Type | Method and Description |
---|---|
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 |
isMtomEnabled(Message message) |
static boolean |
isTypeSupported(String contentType,
List<String> types) |
public static final String BODY_ATTACHMENT_ID
public static javax.activation.CommandMap getCommandMap()
public static boolean isMtomEnabled(Message message)
public static String createContentID(String ns) throws UnsupportedEncodingException
ns
- UnsupportedEncodingException
public static String getUniqueBoundaryValue()
public static String getAttachmentPartHeader(Attachment att)
public static Map<String,javax.activation.DataHandler> getDHMap(Collection<Attachment> attachments)
public static Attachment createAttachment(InputStream stream, javax.mail.internet.InternetHeaders headers) throws IOException
IOException
public static Attachment createMtomAttachment(boolean isXop, String mimeType, String elementNS, byte[] data, int offset, int length, int threshold)
public static Attachment createMtomAttachmentFromDH(boolean isXop, javax.activation.DataHandler handler, String elementNS, int threshold)
public static javax.activation.DataSource getAttachmentDataSource(String contentId, Collection<Attachment> atts)
Apache CXF