com.sun.xml.messaging.saaj.soap
Class AttachmentPartImpl

java.lang.Object
  extended by javax.xml.soap.AttachmentPart
      extended by com.sun.xml.messaging.saaj.soap.AttachmentPartImpl

public class AttachmentPartImpl
extends javax.xml.soap.AttachmentPart

Implementation of attachments.

Author:
Anil Vijendran ([email protected])

Field Summary
protected static Logger log
           
 
Constructor Summary
AttachmentPartImpl()
           
AttachmentPartImpl(org.jvnet.mimepull.MIMEPart part)
           
 
Method Summary
 void addMimeHeader(String name, String value)
           
 void clearContent()
           
static void copyMimeHeaders(MimeBodyPart mbp, AttachmentPartImpl ap)
           
static void copyMimeHeaders(javax.xml.soap.MimeHeaders headers, MimeBodyPart mbp)
           
 boolean equals(Object o)
           
 Iterator getAllMimeHeaders()
           
 InputStream getBase64Content()
           
 Object getContent()
           
 javax.activation.DataHandler getDataHandler()
           
 Iterator getMatchingMimeHeaders(String[] names)
           
 String[] getMimeHeader(String name)
           
 javax.xml.soap.MimeHeaders getMimeHeaders()
           
 Iterator getNonMatchingMimeHeaders(String[] names)
           
 InputStream getRawContent()
           
 byte[] getRawContentBytes()
           
 int getSize()
           
 void removeAllMimeHeaders()
           
 void removeMimeHeader(String header)
           
 void setBase64Content(InputStream content, String contentType)
           
 void setContent(Object object, String contentType)
           
 void setDataHandler(javax.activation.DataHandler dataHandler)
           
 void setMimeHeader(String name, String value)
           
 void setRawContent(InputStream content, String contentType)
           
 void setRawContentBytes(byte[] content, int off, int len, String contentType)
           
 
Methods inherited from class javax.xml.soap.AttachmentPart
getContentId, getContentLocation, getContentType, setContentId, setContentLocation, setContentType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Logger log
Constructor Detail

AttachmentPartImpl

public AttachmentPartImpl()

AttachmentPartImpl

public AttachmentPartImpl(org.jvnet.mimepull.MIMEPart part)
Method Detail

getSize

public int getSize()
            throws javax.xml.soap.SOAPException
Specified by:
getSize in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

clearContent

public void clearContent()
Specified by:
clearContent in class javax.xml.soap.AttachmentPart

getContent

public Object getContent()
                  throws javax.xml.soap.SOAPException
Specified by:
getContent in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

setContent

public void setContent(Object object,
                       String contentType)
                throws IllegalArgumentException
Specified by:
setContent in class javax.xml.soap.AttachmentPart
Throws:
IllegalArgumentException

getDataHandler

public javax.activation.DataHandler getDataHandler()
                                            throws javax.xml.soap.SOAPException
Specified by:
getDataHandler in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

setDataHandler

public void setDataHandler(javax.activation.DataHandler dataHandler)
                    throws IllegalArgumentException
Specified by:
setDataHandler in class javax.xml.soap.AttachmentPart
Throws:
IllegalArgumentException

removeAllMimeHeaders

public void removeAllMimeHeaders()
Specified by:
removeAllMimeHeaders in class javax.xml.soap.AttachmentPart

removeMimeHeader

public void removeMimeHeader(String header)
Specified by:
removeMimeHeader in class javax.xml.soap.AttachmentPart

getMimeHeader

public String[] getMimeHeader(String name)
Specified by:
getMimeHeader in class javax.xml.soap.AttachmentPart

setMimeHeader

public void setMimeHeader(String name,
                          String value)
Specified by:
setMimeHeader in class javax.xml.soap.AttachmentPart

addMimeHeader

public void addMimeHeader(String name,
                          String value)
Specified by:
addMimeHeader in class javax.xml.soap.AttachmentPart

getAllMimeHeaders

public Iterator getAllMimeHeaders()
Specified by:
getAllMimeHeaders in class javax.xml.soap.AttachmentPart

getMatchingMimeHeaders

public Iterator getMatchingMimeHeaders(String[] names)
Specified by:
getMatchingMimeHeaders in class javax.xml.soap.AttachmentPart

getNonMatchingMimeHeaders

public Iterator getNonMatchingMimeHeaders(String[] names)
Specified by:
getNonMatchingMimeHeaders in class javax.xml.soap.AttachmentPart

copyMimeHeaders

public static void copyMimeHeaders(javax.xml.soap.MimeHeaders headers,
                                   MimeBodyPart mbp)
                            throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

copyMimeHeaders

public static void copyMimeHeaders(MimeBodyPart mbp,
                                   AttachmentPartImpl ap)
                            throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

setBase64Content

public void setBase64Content(InputStream content,
                             String contentType)
                      throws javax.xml.soap.SOAPException
Specified by:
setBase64Content in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

getBase64Content

public InputStream getBase64Content()
                             throws javax.xml.soap.SOAPException
Specified by:
getBase64Content in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

setRawContent

public void setRawContent(InputStream content,
                          String contentType)
                   throws javax.xml.soap.SOAPException
Specified by:
setRawContent in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

setRawContentBytes

public void setRawContentBytes(byte[] content,
                               int off,
                               int len,
                               String contentType)
                        throws javax.xml.soap.SOAPException
Specified by:
setRawContentBytes in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

getRawContent

public InputStream getRawContent()
                          throws javax.xml.soap.SOAPException
Specified by:
getRawContent in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

getRawContentBytes

public byte[] getRawContentBytes()
                          throws javax.xml.soap.SOAPException
Specified by:
getRawContentBytes in class javax.xml.soap.AttachmentPart
Throws:
javax.xml.soap.SOAPException

equals

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

getMimeHeaders

public javax.xml.soap.MimeHeaders getMimeHeaders()


Copyright © 2012 Oracle. All Rights Reserved.