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:
ApplicationEDIEntity
,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 class
MimeEntity.NoCloseOutputStream
An OuputStream wrapper that doesn't close its underlying output stream.
-
Field Summary
Fields Modifier and Type Field Description protected long
contentLength
protected org.apache.http.Header
contentTransferEncoding
protected boolean
isMainBody
protected static long
RECALCULATE_CONTENT_LENGTH
protected static long
UNKNOWN_CONTENT_LENGTH
-
Constructor Summary
Constructors Modifier Constructor Description protected
MimeEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeader(String name, String value)
void
addHeader(org.apache.http.Header header)
boolean
containsHeader(String name)
org.apache.http.Header[]
getAllHeaders()
String
getCharset()
InputStream
getContent()
String
getContentEncodingValue()
long
getContentLength()
org.apache.http.Header
getContentTransferEncoding()
Obtains the Content-Transfer-Encoding header.String
getContentTransferEncodingValue()
String
getContentTypeValue()
org.apache.http.Header
getFirstHeader(String name)
org.apache.http.Header[]
getHeaders(String name)
org.apache.http.Header
getLastHeader(String name)
org.apache.http.HeaderIterator
headerIterator()
org.apache.http.HeaderIterator
headerIterator(String name)
boolean
isMainBody()
boolean
isRepeatable()
boolean
isStreaming()
void
removeAllHeaders()
void
removeHeader(org.apache.http.Header header)
void
removeHeaders(String name)
void
setContentEncoding(org.apache.http.Header contentEncoding)
void
setContentTransferEncoding(String contentTranserEncoding)
Specifies the Content-Transfer-Encoding header, as a string.void
setContentTransferEncoding(org.apache.http.Header contentTransferEncoding)
Specifies the Content-Transfer-Encoding header.void
setContentType(org.apache.http.entity.ContentType contentType)
void
setContentType(org.apache.http.Header contentType)
void
setHeader(String name, String value)
void
setHeader(org.apache.http.Header header)
void
setHeaders(org.apache.http.Header[] headers)
void
setMainBody(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:
setContentType
in classorg.apache.http.entity.AbstractHttpEntity
-
getContentEncodingValue
public String getContentEncodingValue()
-
setContentEncoding
public void setContentEncoding(org.apache.http.Header contentEncoding)
- Overrides:
setContentEncoding
in 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 thecontentEncoding
attribute.- 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 thecontentTransferEncoding
attribute.- Parameters:
contentTransferEncoding
- the new Content-Transfer-Encoding header, ornull
to 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, ornull
to 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()
-
-