org.apache.http.HttpEntitypublic class InspectableCachedHttpEntity
extends org.apache.http.entity.HttpEntityWrapper
HttpEntity that is reusable and can copy its content from another entity at a controlled rate.
This entity store its content in a InspectableFileCachedInputStream and can copy the content from another entity
using copyContent(long, long, long, long) possibly throwing a TooSlowException in case the copy speed gets
to slow.| Constructor | Description |
|---|---|
InspectableCachedHttpEntity(InspectableFileCachedInputStream cachedContent) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
|
boolean |
copyContent(long maxLength,
long startTime,
long minDelay,
long minBytesPerSecond) |
|
java.io.InputStream |
getContent() |
|
long |
getContentLength() |
|
void |
setEntity(org.apache.http.HttpEntity wrappedEntity) |
public InspectableCachedHttpEntity(InspectableFileCachedInputStream cachedContent)
public void setEntity(org.apache.http.HttpEntity wrappedEntity)
throws java.io.IOException
java.io.IOExceptionpublic boolean copyContent(long maxLength,
long startTime,
long minDelay,
long minBytesPerSecond)
throws java.io.IOException,
TooSlowException
java.io.IOExceptionTooSlowExceptionpublic void clear()
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getContent()
throws java.io.IOException
getContent in interface org.apache.http.HttpEntitygetContent in class org.apache.http.entity.HttpEntityWrapperjava.io.IOExceptionpublic long getContentLength()
getContentLength in interface org.apache.http.HttpEntitygetContentLength in class org.apache.http.entity.HttpEntityWrapper