-
public interface SourceSource for proxy.
-
-
Method Summary
Modifier and Type Method Description abstract voidopen(long offset)Opens source. abstract longlength()Returns length bytes or negative value if length is unknown. abstract intread(Array<byte> buffer)Read data to byte buffer from source with current offset. abstract voidclose()Closes source and release resources. -
-
Method Detail
-
open
abstract void open(long offset)
Opens source. Source should be open before using read
- Parameters:
offset- offset in bytes for source.
-
length
abstract long length()
Returns length bytes or negative value if length is unknown.
-
read
abstract int read(Array<byte> buffer)
Read data to byte buffer from source with current offset.
- Parameters:
buffer- a buffer to be used for reading data.
-
close
abstract void close()
Closes source and release resources. Every opened source should be closed.
-
-
-
-