public interface Source
| 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.
|
void open(long offset) throws ProxyCacheException
read(byte[])offset - offset in bytes for source.ProxyCacheException - if error occur while opening source.long length()
throws ProxyCacheException
ProxyCacheException - if error occur while fetching source data.int read(byte[] buffer) throws ProxyCacheException
buffer - a buffer to be used for reading data.ProxyCacheException - if error occur while reading source.void close()
throws ProxyCacheException
ProxyCacheException - if error occur while closing source.