Class ReadableSourceOverByteBuffer
java.lang.Object
org.aksw.commons.io.input.ReadableSourceOverByteBuffer
- All Implemented Interfaces:
HasArrayOps<byte[]>, ReadableSource<byte[]>
-
Field Details
-
byteBuffer
-
index
protected int index
-
-
Constructor Details
-
ReadableSourceOverByteBuffer
-
-
Method Details
-
getArrayOps
- Specified by:
getArrayOpsin interfaceHasArrayOps<byte[]>
-
read
Description copied from interface:ReadableSourceRead method following the usual InputStream protocol.- Specified by:
readin interfaceReadableSource<byte[]>- Parameters:
array- The array into which to put the read dataposition- Offset into array where to start writinglength- Maximum number of items to read.- Returns:
- The number of items read. Return -1 if end of data was reached, and 0 iff length was 0.
- Throws:
IOException
-