org.apache.http.impl.client.cache
Class SizeLimitedResponseReader
java.lang.Object
org.apache.http.impl.client.cache.SizeLimitedResponseReader
public class SizeLimitedResponseReader
- extends Object
- Since:
- 4.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SizeLimitedResponseReader
public SizeLimitedResponseReader(int maxResponseSizeBytes,
HttpResponse response)
- Create an
HttpResponse
that is limited in size, this allows for checking
the size of objects that will be stored in the cache.
- Parameters:
maxResponseSizeBytes
- Maximum size that a response can be to be eligible for cache inclusionresponse
- The HttpResponse
isResponseTooLarge
protected boolean isResponseTooLarge()
throws IOException
- Throws:
IOException
getResponseBytes
protected byte[] getResponseBytes()
getReconstructedResponse
protected HttpResponse getReconstructedResponse()
getCombinedInputStream
protected InputStream getCombinedInputStream()
getContentInputStream
protected InputStream getContentInputStream()
constructResponse
protected HttpResponse constructResponse(HttpResponse originalResponse,
InputStream combinedStream)
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.