public final class AttachmentUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTACHMENT_CONTENT_TYPE |
static String |
ATTACHMENT_XOP_FOLLOW_URLS_PROPERTY |
static String |
BODY_ATTACHMENT_ID |
public static final String ATTACHMENT_CONTENT_TYPE
public static final String ATTACHMENT_XOP_FOLLOW_URLS_PROPERTY
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
IOExceptionpublic static String createContentID(String ns) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static String getUniqueBoundaryValue()
public static Map<String,DataHandler> getDHMap(Collection<Attachment> attachments)
public static Attachment createAttachment(InputStream stream, Map<String,List<String>> headers) throws IOException
IOExceptionpublic static Attachment createAttachment(InputStream stream, Map<String,List<String>> headers, Message message) throws IOException
IOExceptionpublic static InputStream decode(InputStream in, String encoding) throws IOException
IOExceptionpublic 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)
Apache CXF