Class Attachment

java.lang.Object
org.apache.cxf.jaxrs.ext.multipart.Attachment
All Implemented Interfaces:
org.apache.cxf.io.Transferable

public class Attachment extends Object implements org.apache.cxf.io.Transferable
This class represents an attachment; generally a multipart part. Some constructors in here are intended only for internal use in CXF, others are suitable or preparing attachments to pass to the
invalid reference
org.apache.cxf.jaxrs.client.WebClient
API. See the AttachmentBuilder for a convenient way to create attachments for use with
invalid reference
org.apache.cxf.jaxrs.client.WebClient
.
  • Constructor Details

    • Attachment

      public Attachment(org.apache.cxf.message.Attachment a, jakarta.ws.rs.ext.Providers providers)
    • Attachment

      public Attachment(String id, jakarta.activation.DataHandler dh, jakarta.ws.rs.core.MultivaluedMap<String,String> headers)
    • Attachment

      public Attachment(String id, jakarta.activation.DataSource ds, jakarta.ws.rs.core.MultivaluedMap<String,String> headers)
    • Attachment

      public Attachment(jakarta.ws.rs.core.MultivaluedMap<String,String> headers, Object object)
    • Attachment

      public Attachment(InputStream is, jakarta.ws.rs.core.MultivaluedMap<String,String> headers)
    • Attachment

      public Attachment(String mediaType, Object object)
    • Attachment

      public Attachment(String id, String mediaType, Object object)
    • Attachment

      public Attachment(String id, InputStream is, ContentDisposition cd)
    • Attachment

      public Attachment(jakarta.ws.rs.core.MultivaluedMap<String,String> headers, jakarta.activation.DataHandler handler, Object object)
  • Method Details

    • getContentDisposition

      public ContentDisposition getContentDisposition()
    • getContentId

      public String getContentId()
    • getContentType

      public jakarta.ws.rs.core.MediaType getContentType()
    • getDataHandler

      public jakarta.activation.DataHandler getDataHandler()
    • setDataHandler

      public void setDataHandler(jakarta.activation.DataHandler dataHandler)
    • getObject

      public Object getObject()
    • getObject

      public <T> T getObject(Class<T> cls)
    • getHeader

      public String getHeader(String name)
    • getHeaderAsList

      public List<String> getHeaderAsList(String name)
    • getHeaders

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getHeaders()
    • transferTo

      public void transferTo(File destinationFile) throws IOException
      Specified by:
      transferTo in interface org.apache.cxf.io.Transferable
      Throws:
      IOException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object