org.apache.http.impl.client.cache
Class SizeLimitedResponseReader

java.lang.Object
  extended by org.apache.http.impl.client.cache.SizeLimitedResponseReader

public class SizeLimitedResponseReader
extends Object

Since:
4.1

Constructor Summary
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.
 
Method Summary
protected  HttpResponse constructResponse(HttpResponse originalResponse, InputStream combinedStream)
           
protected  InputStream getCombinedInputStream()
           
protected  InputStream getContentInputStream()
           
protected  HttpResponse getReconstructedResponse()
           
protected  byte[] getResponseBytes()
           
protected  boolean isResponseTooLarge()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 inclusion
response - The HttpResponse
Method Detail

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.