Class MimeEntity
- java.lang.Object
-
- org.apache.http.entity.AbstractHttpEntity
-
- org.apache.camel.component.as2.api.entity.MimeEntity
-
- All Implemented Interfaces:
org.apache.http.HttpEntity
- Direct Known Subclasses:
ApplicationEntity,ApplicationPkcs7MimeCompressedDataEntity,ApplicationPkcs7MimeEnvelopedDataEntity,ApplicationPkcs7SignatureEntity,AS2MessageDispositionNotificationEntity,MultipartMimeEntity,TextPlainEntity
public abstract class MimeEntity extends org.apache.http.entity.AbstractHttpEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMimeEntity.NoCloseOutputStreamAn OuputStream wrapper that doesn't close its underlying output stream.
-
Field Summary
Fields Modifier and Type Field Description protected longcontentLengthprotected org.apache.http.HeadercontentTransferEncodingprotected booleanisMainBodyprotected static longRECALCULATE_CONTENT_LENGTHprotected static longUNKNOWN_CONTENT_LENGTH
-
Constructor Summary
Constructors Modifier Constructor Description protectedMimeEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHeader(String name, String value)voidaddHeader(org.apache.http.Header header)booleancontainsHeader(String name)org.apache.http.Header[]getAllHeaders()StringgetCharset()InputStreamgetContent()StringgetContentEncodingValue()longgetContentLength()org.apache.http.HeadergetContentTransferEncoding()Obtains the Content-Transfer-Encoding header.StringgetContentTransferEncodingValue()StringgetContentTypeValue()org.apache.http.HeadergetFirstHeader(String name)org.apache.http.Header[]getHeaders(String name)org.apache.http.HeadergetLastHeader(String name)org.apache.http.HeaderIteratorheaderIterator()org.apache.http.HeaderIteratorheaderIterator(String name)booleanisMainBody()booleanisRepeatable()booleanisStreaming()voidremoveAllHeaders()voidremoveHeader(org.apache.http.Header header)voidremoveHeaders(String name)voidsetContentEncoding(org.apache.http.Header contentEncoding)voidsetContentTransferEncoding(String contentTranserEncoding)Specifies the Content-Transfer-Encoding header, as a string.voidsetContentTransferEncoding(org.apache.http.Header contentTransferEncoding)Specifies the Content-Transfer-Encoding header.voidsetContentType(org.apache.http.entity.ContentType contentType)voidsetContentType(org.apache.http.Header contentType)voidsetHeader(String name, String value)voidsetHeader(org.apache.http.Header header)voidsetHeaders(org.apache.http.Header[] headers)voidsetMainBody(boolean isMainBody)-
Methods inherited from class org.apache.http.entity.AbstractHttpEntity
consumeContent, getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentType, toString
-
-
-
-
Field Detail
-
UNKNOWN_CONTENT_LENGTH
protected static final long UNKNOWN_CONTENT_LENGTH
- See Also:
- Constant Field Values
-
RECALCULATE_CONTENT_LENGTH
protected static final long RECALCULATE_CONTENT_LENGTH
- See Also:
- Constant Field Values
-
isMainBody
protected boolean isMainBody
-
contentTransferEncoding
protected org.apache.http.Header contentTransferEncoding
-
contentLength
protected long contentLength
-
-
Method Detail
-
isMainBody
public boolean isMainBody()
-
setMainBody
public void setMainBody(boolean isMainBody)
-
getContentTypeValue
public String getContentTypeValue()
-
setContentType
public void setContentType(org.apache.http.entity.ContentType contentType)
-
setContentType
public void setContentType(org.apache.http.Header contentType)
- Overrides:
setContentTypein classorg.apache.http.entity.AbstractHttpEntity
-
getContentEncodingValue
public String getContentEncodingValue()
-
setContentEncoding
public void setContentEncoding(org.apache.http.Header contentEncoding)
- Overrides:
setContentEncodingin classorg.apache.http.entity.AbstractHttpEntity
-
getContentTransferEncodingValue
public String getContentTransferEncodingValue()
-
getContentTransferEncoding
public org.apache.http.Header getContentTransferEncoding()
Obtains the Content-Transfer-Encoding header. The default implementation returns the value of thecontentEncodingattribute.- Returns:
- the Content-Transfer-Encoding header, or
null
-
setContentTransferEncoding
public void setContentTransferEncoding(org.apache.http.Header contentTransferEncoding)
Specifies the Content-Transfer-Encoding header. The default implementation sets the value of thecontentTransferEncodingattribute.- Parameters:
contentTransferEncoding- the new Content-Transfer-Encoding header, ornullto unset
-
setContentTransferEncoding
public void setContentTransferEncoding(String contentTranserEncoding)
Specifies the Content-Transfer-Encoding header, as a string. The default implementation callssetContentTransferEncoding(Header).- Parameters:
contentTranserEncoding- - the new Content-Transfer-Encoding header, ornullto unset
-
containsHeader
public boolean containsHeader(String name)
-
getHeaders
public org.apache.http.Header[] getHeaders(String name)
-
getFirstHeader
public org.apache.http.Header getFirstHeader(String name)
-
getLastHeader
public org.apache.http.Header getLastHeader(String name)
-
getAllHeaders
public org.apache.http.Header[] getAllHeaders()
-
addHeader
public void addHeader(org.apache.http.Header header)
-
setHeader
public void setHeader(org.apache.http.Header header)
-
setHeaders
public void setHeaders(org.apache.http.Header[] headers)
-
removeHeader
public void removeHeader(org.apache.http.Header header)
-
removeHeaders
public void removeHeaders(String name)
-
removeAllHeaders
public void removeAllHeaders()
-
headerIterator
public org.apache.http.HeaderIterator headerIterator()
-
headerIterator
public org.apache.http.HeaderIterator headerIterator(String name)
-
isRepeatable
public boolean isRepeatable()
-
isStreaming
public boolean isStreaming()
-
getContentLength
public long getContentLength()
-
getContent
public InputStream getContent() throws IOException, UnsupportedOperationException
-
getCharset
public String getCharset()
-
-