Class HeapResource
java.lang.Object
org.apache.hc.client5.http.cache.Resource
org.apache.hc.client5.http.impl.cache.HeapResource
- All Implemented Interfaces:
Serializable
Cache resource backed by a byte array on the heap.
- Since:
- 4.1
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Resource
getInputStream
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
arrayRef
-
-
Constructor Details
-
HeapResource
public HeapResource(byte[] b)
-
-
Method Details
-
get
Description copied from class:ResourceReturns resource content as a byte array.Please note for memory efficiency some resource implementations may return a reference to the underlying byte array. The returned value should be treated as immutable.
- Specified by:
getin classResource- Throws:
ResourceIOException
-
length
-
dispose
-