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.Serializable
Represents 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 void
dispose()
Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.java.io.InputStream
getInputStream()
Returns anInputStream
from which the response body can be read.long
length()
Returns the length in bytes of the response body.
-
-
-
Method Detail
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOException
Returns anInputStream
from 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.
-
-