public final class AttachmentUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BODY_ATTACHMENT_ID |
Modifier and Type | Method and Description |
---|---|
static String |
cleanContentId(String id) |
static Attachment |
createAttachment(InputStream stream,
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,
DataHandler handler,
String elementNS,
int threshold) |
static DataSource |
getAttachmentDataSource(String contentId,
Collection<Attachment> atts) |
static String |
getAttachmentPartHeader(Attachment att) |
static CommandMap |
getCommandMap() |
static Map<String,DataHandler> |
getDHMap(Collection<Attachment> attachments) |
static String |
getUniqueBoundaryValue() |
static boolean |
isMtomEnabled(Message message) |
static boolean |
isTypeSupported(String contentType,
List<String> types) |
static void |
setStreamedAttachmentProperties(Message message,
CachedOutputStream bos) |
public static final String BODY_ATTACHMENT_ID
public static CommandMap getCommandMap()
public static boolean isMtomEnabled(Message message)
public static void setStreamedAttachmentProperties(Message message, CachedOutputStream bos) throws IOException
IOException
public static String createContentID(String ns) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String getUniqueBoundaryValue()
public static String getAttachmentPartHeader(Attachment att)
public static Map<String,DataHandler> getDHMap(Collection<Attachment> attachments)
public static Attachment createAttachment(InputStream stream, 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, DataHandler handler, String elementNS, int threshold)
public static DataSource getAttachmentDataSource(String contentId, Collection<Attachment> atts)
Copyright © 2018 JBoss by Red Hat. All rights reserved.