Package org.apache.cxf.attachment
Class AttachmentUtil
- java.lang.Object
- 
- org.apache.cxf.attachment.AttachmentUtil
 
- 
 public final class AttachmentUtil extends Object 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringATTACHMENT_CONTENT_TYPEstatic StringATTACHMENT_XOP_FOLLOW_URLS_PROPERTYstatic StringBODY_ATTACHMENT_ID
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringcleanContentId(String id)static AttachmentcreateAttachment(InputStream stream, Map<String,List<String>> headers)Deprecated.use createAttachment(InputStream stream, Map> headers, Message message) static AttachmentcreateAttachment(InputStream stream, Map<String,List<String>> headers, Message message)static StringcreateContentID(String ns)static AttachmentcreateMtomAttachment(boolean isXop, String mimeType, String elementNS, byte[] data, int offset, int length, int threshold)static AttachmentcreateMtomAttachmentFromDH(boolean isXop, javax.activation.DataHandler handler, String elementNS, int threshold)static InputStreamdecode(InputStream in, String encoding)static javax.activation.DataSourcegetAttachmentDataSource(String contentId, Collection<Attachment> atts)static javax.activation.CommandMapgetCommandMap()static Map<String,javax.activation.DataHandler>getDHMap(Collection<Attachment> attachments)static StringgetUniqueBoundaryValue()static booleanisMtomEnabled(Message message)static booleanisTypeSupported(String contentType, List<String> types)static voidsetStreamedAttachmentProperties(Message message, CachedOutputStream bos)
 
- 
- 
- 
Field Detail- 
ATTACHMENT_CONTENT_TYPEpublic static final String ATTACHMENT_CONTENT_TYPE - See Also:
- Constant Field Values
 
 - 
ATTACHMENT_XOP_FOLLOW_URLS_PROPERTYpublic static final String ATTACHMENT_XOP_FOLLOW_URLS_PROPERTY - See Also:
- Constant Field Values
 
 - 
BODY_ATTACHMENT_IDpublic static final String BODY_ATTACHMENT_ID - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getCommandMappublic static javax.activation.CommandMap getCommandMap() 
 - 
isMtomEnabledpublic static boolean isMtomEnabled(Message message) 
 - 
setStreamedAttachmentPropertiespublic static void setStreamedAttachmentProperties(Message message, CachedOutputStream bos) throws IOException - Throws:
- IOException
 
 - 
createContentIDpublic static String createContentID(String ns) throws UnsupportedEncodingException - Throws:
- UnsupportedEncodingException
 
 - 
getUniqueBoundaryValuepublic static String getUniqueBoundaryValue() 
 - 
getDHMappublic static Map<String,javax.activation.DataHandler> getDHMap(Collection<Attachment> attachments) 
 - 
createAttachmentpublic static Attachment createAttachment(InputStream stream, Map<String,List<String>> headers) throws IOException Deprecated.use createAttachment(InputStream stream, Map> headers, Message message) - Throws:
- IOException
 
 - 
createAttachmentpublic static Attachment createAttachment(InputStream stream, Map<String,List<String>> headers, Message message) throws IOException - Throws:
- IOException
 
 - 
decodepublic static InputStream decode(InputStream in, String encoding) throws IOException - Throws:
- IOException
 
 - 
createMtomAttachmentpublic static Attachment createMtomAttachment(boolean isXop, String mimeType, String elementNS, byte[] data, int offset, int length, int threshold) 
 - 
createMtomAttachmentFromDHpublic static Attachment createMtomAttachmentFromDH(boolean isXop, javax.activation.DataHandler handler, String elementNS, int threshold) 
 - 
getAttachmentDataSourcepublic static javax.activation.DataSource getAttachmentDataSource(String contentId, Collection<Attachment> atts) 
 
- 
 
-