Class ReadableByteChannelForLinesMatchingPrefix
java.lang.Object
org.aksw.commons.io.hadoop.binseach.v2.ReadableByteChannelForLinesMatchingPrefix
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, HasArrayOps<byte[]>, ReadableChannel<byte[]>, ReadableSource<byte[]>
public class ReadableByteChannelForLinesMatchingPrefix
extends Object
implements ReadableChannel<byte[]>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RingBufferForBytesprotected ReadableChannel<byte[]> protected byteprotected booleanprotected booleanprotected longprotected longprotected BinSearchScanState -
Constructor Summary
ConstructorsConstructorDescriptionReadableByteChannelForLinesMatchingPrefix(ReadableChannel<byte[]> channel, BinSearchScanState state) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ReadableSource
readRaw
-
Field Details
-
channel
-
state
-
delimiter
protected byte delimiter -
position
protected long position -
knownDelimPos
protected long knownDelimPos -
isCurrentLineValidated
protected boolean isCurrentLineValidated -
buffer
-
endReached
protected boolean endReached
-
-
Constructor Details
-
ReadableByteChannelForLinesMatchingPrefix
public ReadableByteChannelForLinesMatchingPrefix(ReadableChannel<byte[]> channel, BinSearchScanState state)
-
-
Method Details
-
read
- Specified by:
readin interfaceReadableSource<byte[]>- Throws:
IOException
-
isOpen
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getArrayOps
- Specified by:
getArrayOpsin interfaceHasArrayOps<byte[]>
-