All Methods Instance Methods Concrete Methods Modifier and Type Method Description
getContent()Returns a content stream of the entity.
getContentEncoding()Obtains the Content-Encoding header, if known.
getContentLength()Tells the length of the content, if known.
writeTo(OutputStream outStream)Writes the entity content out to the output stream.
Methods inherited from class org.apache.http.entity.HttpEntityWrapper
consumeContent, getContentType, isChunked, isRepeatable, isStreaming
public InputStream getContent() throws IOExceptionReturns a content stream of the entity.
Repeatableentities are expected to create a new instance of
InputStreamfor each invocation of this method and therefore can be consumed multiple times. Entities that are not
repeatableare expected to return the same
InputStreaminstance and therefore may not be consumed more than once.
IMPORTANT: Please note all entity implementations must ensure that all allocated resources are properly deallocated after the
InputStream.close()method is invoked.
public void writeTo(OutputStream outStream) throws IOExceptionWrites the entity content out to the output stream.
IMPORTANT: Please note all entity implementations must ensure that all allocated resources are properly deallocated when this method returns.
public Header getContentEncoding()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.
public long getContentLength()Tells the length of the content, if known.