@Contract(threading=IMMUTABLE) public class HeapResource extends java.lang.Object implements Resource
Modifier and Type | Field and Description |
---|---|
private byte[] |
b |
private static long |
serialVersionUID |
Constructor and Description |
---|
HeapResource(byte[] b) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Indicates the system no longer needs to keep this
response body and any system resources associated with
it may be reclaimed.
|
(package private) byte[] |
getByteArray() |
java.io.InputStream |
getInputStream()
Returns an
InputStream from which the response
body can be read. |
long |
length()
Returns the length in bytes of the response body.
|
private static final long serialVersionUID
private final byte[] b
byte[] getByteArray()
public java.io.InputStream getInputStream()
Resource
InputStream
from which the response
body can be read.getInputStream
in interface Resource
public long length()
Resource