Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ public interface HttpEntity extends EntityDetails, Closeable {
* to return the same {@link InputStream} instance and therefore
* may not be consumed more than once.
* <p>
* If this entity belongs to an incoming HTTP message, calling
* {@link InputStream#close()} on the returned {@code InputStream} will
* try to consume the complete entity content to keep the connection
* alive. In cases where this is undesired, e.g. when only a small part
* of the content is relevant and consuming the complete entity content
* would be too inefficient, <i>only</i> the HTTP message from which
* this entity was obtained should be closed (if supported).
* </p>
* <p>
* IMPORTANT: Please note all entity implementations must ensure that
* all allocated resources are properly deallocated after
* the {@link InputStream#close()} method is invoked.
Expand Down