Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cxf.attachment
Class AttachmentUtil

    java.lang.Object
      org.apache.cxf.attachment.AttachmentUtil

    public final class AttachmentUtil

extends Object

Field Summary
`static String` | `BODY_ATTACHMENT_ID`

Method Summary
`static Attachment` | `createAttachment(InputStream stream, javax.mail.internet.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, javax.activation.DataHandler handler, String elementNS, int threshold)`
`static javax.activation.DataSource` | `getAttachmentDataSource(String contentId, Collection<Attachment> atts)`
`static String` | `getAttachmentPartHeader(Attachment att)`
`static javax.activation.CommandMap` | `getCommandMap()`
`static Map<String,javax.activation.DataHandler>` | `getDHMap(Collection<Attachment> attachments)`
`static String` | `getUniqueBoundaryValue()`
`static boolean` | `isTypeSupported(String contentType, List<String> types)`
`static void` | `setStreamedAttachmentProperties(Message message, CachedOutputStream bos)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BODY_ATTACHMENT_ID

    public static final String BODY_ATTACHMENT_ID

See Also:
  Constant Field Values

Method Detail

### getCommandMap

    public static javax.activation.CommandMap getCommandMap()

### setStreamedAttachmentProperties

    public static void setStreamedAttachmentProperties(Message message,
                                                       CachedOutputStream bos)
                                                throws IOException

  Throws:
    `IOException`

### createContentID

    public static String createContentID(String ns)
                                  throws UnsupportedEncodingException

  Parameters:
    `ns` -
  Returns:
  Throws:
    `UnsupportedEncodingException`

### getUniqueBoundaryValue

    public static String getUniqueBoundaryValue()

### getAttachmentPartHeader

    public static String getAttachmentPartHeader(Attachment att)

### getDHMap

    public static Map<String,javax.activation.DataHandler> getDHMap(Collection<Attachment> attachments)

### createAttachment

    public static Attachment createAttachment(InputStream stream,
                                              javax.mail.internet.InternetHeaders headers)
                                       throws IOException

  Throws:
    `IOException`

### isTypeSupported

    public static boolean isTypeSupported(String contentType,
                                          List<String> types)

### 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,
                                                        javax.activation.DataHandler handler,
                                                        String elementNS,
                                                        int threshold)

### getAttachmentDataSource

    public static javax.activation.DataSource getAttachmentDataSource(String contentId,
                                                                      Collection<Attachment> atts)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Apache CXF