org.apache.http.client.cache
Interface Resource

All Superinterfaces:
Serializable
All Known Implementing Classes:
FileResource, HeapResource

public interface Resource
extends Serializable

Represents a disposable system resource used for handling cached response bodies.

Since:
4.1

Method Summary
 void dispose()
          Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.
 InputStream getInputStream()
          Returns an InputStream from which the response body can be read.
 long length()
          Returns the length in bytes of the response body.
 

Method Detail

getInputStream

InputStream getInputStream()
                           throws IOException
Returns an InputStream from which the response body can be read.

Throws:
IOException

length

long length()
Returns the length in bytes of the response body.


dispose

void dispose()
Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.



Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.