| Constructor and Description |
|---|
ByteArraySource(byte[] data) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes source and release resources.
|
long |
length()
Returns length bytes or negative value if length is unknown.
|
void |
open(long offset)
Opens source.
|
int |
read(byte[] buffer)
Read data to byte buffer from source with current offset.
|
public int read(byte[] buffer)
throws ProxyCacheException
Sourceread in interface Sourcebuffer - a buffer to be used for reading data.ProxyCacheException - if error occur while reading source.public long length()
throws ProxyCacheException
Sourcelength in interface SourceProxyCacheException - if error occur while fetching source data.public void open(long offset)
throws ProxyCacheException
SourceSource.read(byte[])open in interface Sourceoffset - offset in bytes for source.ProxyCacheException - if error occur while opening source.public void close()
throws ProxyCacheException
Sourceclose in interface SourceProxyCacheException - if error occur while closing source.