Package org.apache.cxf.attachment
Class AttachmentUtil
java.lang.Object
org.apache.cxf.attachment.AttachmentUtil
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
cleanContentId
(String id) static Attachment
createAttachment
(InputStream stream, Map<String, List<String>> headers) Deprecated.use createAttachment(InputStream stream, Map<String, List> headers, Message message) static Attachment
createAttachment
(InputStream stream, Map<String, List<String>> headers, Message message) static String
static Attachment
createMtomAttachment
(boolean isXop, String mimeType, String elementNS, byte[] data, int offset, int length, int threshold) static Attachment
createMtomAttachmentFromDH
(boolean isXop, jakarta.activation.DataHandler handler, String elementNS, int threshold) static InputStream
decode
(InputStream in, String encoding) static jakarta.activation.DataSource
getAttachmentDataSource
(String contentId, Collection<Attachment> atts) static jakarta.activation.CommandMap
getDHMap
(Collection<Attachment> attachments) static String
static boolean
isMtomEnabled
(Message message) static boolean
isTypeSupported
(String contentType, List<String> types) static void
setStreamedAttachmentProperties
(Message message, CachedOutputStream bos)
-
Field Details
-
ATTACHMENT_CONTENT_TYPE
- See Also:
-
ATTACHMENT_XOP_FOLLOW_URLS_PROPERTY
- See Also:
-
BODY_ATTACHMENT_ID
- See Also:
-
-
Method Details
-
getCommandMap
public static jakarta.activation.CommandMap getCommandMap() -
isMtomEnabled
-
setStreamedAttachmentProperties
public static void setStreamedAttachmentProperties(Message message, CachedOutputStream bos) throws IOException - Throws:
IOException
-
createContentID
- Throws:
UnsupportedEncodingException
-
getUniqueBoundaryValue
-
getDHMap
public static Map<String,jakarta.activation.DataHandler> getDHMap(Collection<Attachment> attachments) -
cleanContentId
-
createAttachment
public static Attachment createAttachment(InputStream stream, Map<String, List<String>> headers) throws IOExceptionDeprecated.use createAttachment(InputStream stream, Map<String, List> headers, Message message) - Throws:
IOException
-
createAttachment
public static Attachment createAttachment(InputStream stream, Map<String, List<String>> headers, Message message) throws IOException- Throws:
IOException
-
decode
- Throws:
IOException
-
isTypeSupported
-
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, jakarta.activation.DataHandler handler, String elementNS, int threshold) -
getAttachmentDataSource
public static jakarta.activation.DataSource getAttachmentDataSource(String contentId, Collection<Attachment> atts)
-