Package org.apache.cxf.attachment
Class AttachmentUtil
- java.lang.Object
-
- org.apache.cxf.attachment.AttachmentUtil
-
public final class AttachmentUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
BODY_ATTACHMENT_ID
-
Method Summary
-
-
-
Field Detail
-
BODY_ATTACHMENT_ID
public static final String BODY_ATTACHMENT_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCommandMap
public static CommandMap getCommandMap()
-
isMtomEnabled
public static boolean isMtomEnabled(Message message)
-
setStreamedAttachmentProperties
public static void setStreamedAttachmentProperties(Message message, CachedOutputStream bos) throws IOException
- Throws:
IOException
-
createContentID
public static String createContentID(String ns) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getUniqueBoundaryValue
public static String getUniqueBoundaryValue()
-
getDHMap
public static Map<String,DataHandler> getDHMap(Collection<Attachment> attachments)
-
createAttachment
public static Attachment createAttachment(InputStream stream, Map<String,List<String>> headers) throws IOException
- Throws:
IOException
-
decode
public static InputStream decode(InputStream in, String encoding) throws IOException
- Throws:
IOException
-
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, DataHandler handler, String elementNS, int threshold)
-
getAttachmentDataSource
public static DataSource getAttachmentDataSource(String contentId, Collection<Attachment> atts)
-
-