|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.xml.soap.AttachmentPart
org.jboss.soa.esb.actions.soap.attachment.AttachmentPartImpl
public class AttachmentPartImpl
Implementation of the AttachmentPart interface.
AttachmentPart| Constructor Summary | |
|---|---|
AttachmentPartImpl()
|
|
AttachmentPartImpl(javax.activation.DataHandler handler)
|
|
| Method Summary | |
|---|---|
void |
addMimeHeader(java.lang.String name,
java.lang.String value)
|
void |
clearContent()
|
java.util.Iterator |
getAllMimeHeaders()
|
java.io.InputStream |
getBase64Content()
Returns an InputStream which can be used to obtain the content of AttachmentPart as Base64 encoded character data, this method would base64 encode the raw bytes of the attachment and return. |
java.lang.Object |
getContent()
|
java.lang.String |
getContentId()
|
java.lang.String |
getContentLocation()
|
java.lang.String |
getContentType()
|
javax.activation.DataHandler |
getDataHandler()
|
java.lang.String |
getFirstMimeHeader(java.lang.String header)
Returns the first occurence of a MIME header. |
java.util.Iterator |
getMatchingMimeHeaders(java.lang.String[] names)
|
java.lang.String[] |
getMimeHeader(java.lang.String name)
|
java.util.Iterator |
getNonMatchingMimeHeaders(java.lang.String[] names)
|
java.io.InputStream |
getRawContent()
Gets the content of this AttachmentPart object as an InputStream as if a call had been made to getContent and no DataContentHandler had been registered for the content-type of this AttachmentPart. |
byte[] |
getRawContentBytes()
Gets the content of this AttachmentPart object as a byte[] array as if a call had been made to getContent and no DataContentHandler had been registered for the content-type of this AttachmentPart. |
int |
getSize()
|
void |
removeAllMimeHeaders()
|
void |
removeMimeHeader(java.lang.String name)
|
void |
setBase64Content(java.io.InputStream content,
java.lang.String contentType)
Sets the content of this attachment part from the Base64 source InputStream and sets the value of the Content-Type header to the value contained in contentType, This method would first decode the base64 input and write the resulting raw bytes to the attachment. |
void |
setContent(java.lang.Object object,
java.lang.String contentType)
Sets the content of this attachment part to that of the given Object and sets the value of the Content-Type header to the given type. |
void |
setContentId(java.lang.String contentId)
|
void |
setContentLocation(java.lang.String contentLocation)
|
void |
setContentType(java.lang.String contentType)
|
void |
setDataHandler(javax.activation.DataHandler dataHandler)
|
void |
setMimeHeader(java.lang.String name,
java.lang.String value)
|
void |
setRawContent(java.io.InputStream content,
java.lang.String contentType)
Sets the content of this attachment part to that contained by the InputStream content and sets the value of the Content-Type header to the value contained in contentType. |
void |
setRawContentBytes(byte[] content,
int offset,
int len,
java.lang.String contentType)
Sets the content of this attachment part to that contained by the byte[] array content and sets the value of the Content-Type header to the value contained in contentType. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttachmentPartImpl()
public AttachmentPartImpl(javax.activation.DataHandler handler)
| Method Detail |
|---|
public void addMimeHeader(java.lang.String name,
java.lang.String value)
addMimeHeader in class javax.xml.soap.AttachmentPartpublic void clearContent()
clearContent in class javax.xml.soap.AttachmentPartpublic java.util.Iterator getAllMimeHeaders()
getAllMimeHeaders in class javax.xml.soap.AttachmentPart
public java.lang.Object getContent()
throws javax.xml.soap.SOAPException
getContent in class javax.xml.soap.AttachmentPartjavax.xml.soap.SOAPException
public javax.activation.DataHandler getDataHandler()
throws javax.xml.soap.SOAPException
getDataHandler in class javax.xml.soap.AttachmentPartjavax.xml.soap.SOAPExceptionpublic java.util.Iterator getMatchingMimeHeaders(java.lang.String[] names)
getMatchingMimeHeaders in class javax.xml.soap.AttachmentPartpublic java.lang.String[] getMimeHeader(java.lang.String name)
getMimeHeader in class javax.xml.soap.AttachmentPartpublic java.lang.String getFirstMimeHeader(java.lang.String header)
header - the mime header
public java.util.Iterator getNonMatchingMimeHeaders(java.lang.String[] names)
getNonMatchingMimeHeaders in class javax.xml.soap.AttachmentPart
public int getSize()
throws javax.xml.soap.SOAPException
getSize in class javax.xml.soap.AttachmentPartjavax.xml.soap.SOAPExceptionpublic void removeAllMimeHeaders()
removeAllMimeHeaders in class javax.xml.soap.AttachmentPartpublic void removeMimeHeader(java.lang.String name)
removeMimeHeader in class javax.xml.soap.AttachmentPart
public void setContent(java.lang.Object object,
java.lang.String contentType)
setContent in class javax.xml.soap.AttachmentPartobject - the Java object that makes up the content for this attachment partcontentType - the MIME string that specifies the type of the content
java.lang.IllegalArgumentException - if the contentType does not match the type of the content object,
or if there was no DataContentHandler object for this content objectpublic void setDataHandler(javax.activation.DataHandler dataHandler)
setDataHandler in class javax.xml.soap.AttachmentPart
public void setMimeHeader(java.lang.String name,
java.lang.String value)
setMimeHeader in class javax.xml.soap.AttachmentPartpublic java.lang.String getContentId()
getContentId in class javax.xml.soap.AttachmentPartpublic java.lang.String getContentLocation()
getContentLocation in class javax.xml.soap.AttachmentPartpublic java.lang.String getContentType()
getContentType in class javax.xml.soap.AttachmentPartpublic void setContentId(java.lang.String contentId)
setContentId in class javax.xml.soap.AttachmentPartpublic void setContentLocation(java.lang.String contentLocation)
setContentLocation in class javax.xml.soap.AttachmentPartpublic void setContentType(java.lang.String contentType)
setContentType in class javax.xml.soap.AttachmentPart
public java.io.InputStream getBase64Content()
throws javax.xml.soap.SOAPException
getBase64Content in class javax.xml.soap.AttachmentPartjavax.xml.soap.SOAPException - if there is no content set into this AttachmentPart object or if there was a data transformation error.
public java.io.InputStream getRawContent()
throws javax.xml.soap.SOAPException
getRawContent in class javax.xml.soap.AttachmentPartjavax.xml.soap.SOAPException - if there is no content set into this AttachmentPart object or if there was a data transformation error.
public byte[] getRawContentBytes()
throws javax.xml.soap.SOAPException
getRawContentBytes in class javax.xml.soap.AttachmentPartjavax.xml.soap.SOAPException - if there is no content set into this AttachmentPart object or if there was a data transformation error.
public void setBase64Content(java.io.InputStream content,
java.lang.String contentType)
throws javax.xml.soap.SOAPException
setBase64Content in class javax.xml.soap.AttachmentPartcontent - the base64 encoded data to add to the attachment partcontentType - the value to set into the Content-Type header
javax.xml.soap.SOAPException - if an there is an error in setting the content
java.lang.NullPointerException - if content is null
public void setRawContent(java.io.InputStream content,
java.lang.String contentType)
throws javax.xml.soap.SOAPException
setRawContent in class javax.xml.soap.AttachmentPartcontent - the raw data to add to the attachment partcontentType - the value to set into the Content-Type header
javax.xml.soap.SOAPException - if an there is an error in setting the content
java.lang.NullPointerException - if content is null
public void setRawContentBytes(byte[] content,
int offset,
int len,
java.lang.String contentType)
throws javax.xml.soap.SOAPException
setRawContentBytes in class javax.xml.soap.AttachmentPartcontent - the raw data to add to the attachment partcontentType - the value to set into the Content-Type headeroffset - the offset in the byte array of the contentlen - the number of bytes that form the content
javax.xml.soap.SOAPException - if an there is an error in setting the content or content is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||