Class HeapResource
- java.lang.Object
-
- org.apache.http.impl.client.cache.HeapResource
-
- All Implemented Interfaces:
Serializable,Resource
@Contract(threading=IMMUTABLE) public class HeapResource extends Object implements Resource
Cache resource backed by a byte array on the heap.- Since:
- 4.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HeapResource(byte[] b)
-
Method Summary
All Methods Instance Methods Concrete 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.InputStreamgetInputStream()Returns anInputStreamfrom which the response body can be read.longlength()Returns the length in bytes of the response body.
-
-
-
Method Detail
-
getInputStream
public InputStream getInputStream()
Description copied from interface:ResourceReturns anInputStreamfrom which the response body can be read.- Specified by:
getInputStreamin interfaceResource
-
length
public long length()
Description copied from interface:ResourceReturns the length in bytes of the response body.
-
-