org.apache.http.HttpEntity enclosed in a request message.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final HttpEntity |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | consumeContent()
Implements org. |
| pack-priv static void | |
| public InputStream | getContent()
Implements org. |
| public Header | getContentEncoding()
Implements org. |
| public long | getContentLength()
Implements org. |
| public Header | getContentType()
Implements org. |
| public HttpEntity | |
| public boolean | isChunked()
Implements org. |
| public boolean | |
| pack-priv static boolean | |
| pack-priv static boolean | |
| public boolean | isRepeatable()
Implements org. |
| public boolean | isStreaming()
Implements org. |
| public String | |
| public void | writeTo(final OutputStream
the output stream to write entity content to outStream)Implements org. |
| consumed | back to summary |
|---|---|
| private boolean consumed | |
| original | back to summary |
|---|---|
| private final HttpEntity original | |
| RequestEntityProxy | back to summary |
|---|---|
| pack-priv RequestEntityProxy(final HttpEntity original) | |
| consumeContent | back to summary |
|---|---|
| public void consumeContent() throws IOException Implements org. Doc from org. This method is deprecated since version 4.1. Please use standard
java convention to ensure resource deallocation by calling
This method is called to indicate that the content of this entity is no longer required. All entity implementations are expected to release all allocated resources as a result of this method invocation. Content streaming entities are also expected to dispose of the remaining content, if any. Wrapping entities should delegate this call to the wrapped entity.
This method is of particular importance for entities being
received from a
| |
| enhance | back to summary |
|---|---|
| pack-priv static void enhance(final HttpEntityEnclosingRequest request) | |
| getContent | back to summary |
|---|---|
| public InputStream getContent() throws IOException, IllegalStateException Implements org. Doc from org. Returns a content stream of the entity.
Important Note Please note all entity implementations must ensure that
all allocated resources are properly deallocated after
the
| |
| getContentEncoding | back to summary |
|---|---|
| public Header getContentEncoding() Implements org. Doc from org. Obtains the Content-Encoding header, if known. This is the header that should be used when sending the entity, or the one that was received with the entity. Wrapping entities that modify the content encoding should adjust this header accordingly. | |
| getContentLength | back to summary |
|---|---|
| public long getContentLength() Implements org. Doc from org. Tells the length of the content, if known.
| |
| getContentType | back to summary |
|---|---|
| public Header getContentType() Implements org. Doc from org. Obtains the Content-Type header, if known. This is the header that should be used when sending the entity, or the one that was received with the entity. It can include a charset attribute. | |
| getOriginal | back to summary |
|---|---|
| public HttpEntity getOriginal() | |
| isChunked | back to summary |
|---|---|
| public boolean isChunked() Implements org. Doc from org. Tells about chunked encoding for this entity. The primary purpose of this method is to indicate whether chunked encoding should be used when the entity is sent. For entities that are received, it can also indicate whether the entity was received with chunked encoding. The behavior of wrapping entities is implementation dependent, but should respect the primary purpose.
| |
| isConsumed | back to summary |
|---|---|
| public boolean isConsumed() | |
| isEnhanced | back to summary |
|---|---|
| pack-priv static boolean isEnhanced(final HttpEntity entity) | |
| isRepeatable | back to summary |
|---|---|
| pack-priv static boolean isRepeatable(final HttpRequest request) | |
| isRepeatable | back to summary |
|---|---|
| public boolean isRepeatable() Implements org. Doc from org. Tells if the entity is capable of producing its data more than once. A repeatable entity's getContent() and writeTo(OutputStream) methods can be called more than once whereas a non-repeatable entity's can not.
| |
| isStreaming | back to summary |
|---|---|
| public boolean isStreaming() Implements org. Doc from org. Tells whether this entity depends on an underlying stream.
Streamed entities that read data directly from the socket should
return
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| writeTo | back to summary |
|---|---|
| public void writeTo(final OutputStream outStream) throws IOException Implements org. Doc from org. Writes the entity content out to the output stream. Important Note Please note all entity implementations must ensure that all allocated resources are properly deallocated when this method returns.
| |