Package org.apache.http.client.cache
Interface Resource
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
FileResource,HeapResource
public interface Resource extends java.io.SerializableRepresents a disposable system resource used for handling cached response bodies.- Since:
- 4.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.java.io.InputStreamgetInputStream()Returns anInputStreamfrom which the response body can be read.longlength()Returns the length in bytes of the response body.
-
-
-
Method Detail
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOExceptionReturns anInputStreamfrom which the response body can be read.- Throws:
java.io.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.
-
-