Class HeapResource
java.lang.Object
org.apache.http.impl.client.cache.HeapResource
- All Implemented Interfaces:
Serializable
,Resource
Cache resource backed by a byte array on the heap.
- Since:
- 4.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.Returns anInputStream
from which the response body can be read.long
length()
Returns the length in bytes of the response body.
-
Constructor Details
-
HeapResource
public HeapResource(byte[] b)
-
-
Method Details
-
getInputStream
Description copied from interface:Resource
Returns anInputStream
from which the response body can be read.- Specified by:
getInputStream
in interfaceResource
-
length
public long length()Description copied from interface:Resource
Returns the length in bytes of the response body. -
dispose
public void dispose()Description copied from interface:Resource
Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.
-