org.apache.cxf.attachment

## Class AttachmentImpl

- java.lang.Object
- - org.apache.cxf.attachment.AttachmentImpl

- All Implemented Interfaces:
    Attachment

      public class AttachmentImpl
      extends Object
      implements Attachment

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AttachmentImpl(String idParam)`
    `AttachmentImpl(String idParam, DataHandler handlerParam)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DataHandler` | `getDataHandler()`
    `String` | `getHeader(String name)`
    `Iterator<String>` | `getHeaderNames()`
    `String` | `getId()`
    `boolean` | `isXOP()` Whether or not this is an XOP package.
    `void` | `setDataHandler(DataHandler dataHandler)`
    `void` | `setHeader(String name, String value)`
    `void` | `setXOP(boolean xopParam)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AttachmentImpl

          public AttachmentImpl(String idParam)

    - #### AttachmentImpl

          public AttachmentImpl(String idParam,
                        DataHandler handlerParam)

  - ### Method Detail

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `Attachment`
      Returns:
        The attachment id.

    - #### getDataHandler

          public DataHandler getDataHandler()

      Specified by:
        `getDataHandler` in interface `Attachment`

    - #### setDataHandler

          public void setDataHandler(DataHandler dataHandler)

    - #### setHeader

          public void setHeader(String name,
                       String value)

    - #### getHeader

          public String getHeader(String name)

      Specified by:
        `getHeader` in interface `Attachment`

    - #### getHeaderNames

          public Iterator<String> getHeaderNames()

      Specified by:
        `getHeaderNames` in interface `Attachment`

    - #### isXOP

          public boolean isXOP()

      Description copied from interface: `Attachment`
      Whether or not this is an XOP package. This will affect the serialization of the attachment. If true, it will be serialized as binary data, and not Base64Binary.
      Specified by:
        `isXOP` in interface `Attachment`
      Returns:
        true if this attachment is an XOP package

    - #### setXOP

          public void setXOP(boolean xopParam)

Apache CXF