Class ReadableChannelWithBlockAdvertisementBuffered
java.lang.Object
org.aksw.commons.util.closeable.AutoCloseableBase
org.aksw.commons.util.closeable.AutoCloseableWithLeakDetectionBase
org.aksw.commons.io.shared.ChannelBase
org.aksw.commons.io.input.ReadableChannelBase<byte[]>
org.aksw.commons.io.hadoop.ReadableChannelWithBlockAdvertisementBuffered
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, HasArrayOps<byte[]>, ReadableChannel<byte[]>, ReadableSource<byte[]>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected longprotected InputStreamprotected intprotected byteprotected intprotected longprotected org.apache.hadoop.fs.Seekableprotected longFields inherited from class org.aksw.commons.util.closeable.AutoCloseableWithLeakDetectionBase
instantiationStackTraceFields inherited from class org.aksw.commons.util.closeable.AutoCloseableBase
closeStackTrace, enableCloseStackTrace, isClosed -
Constructor Summary
ConstructorsConstructorDescriptionReadableChannelWithBlockAdvertisementBuffered(InputStream decodedIn, int endOfBlockMarker) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDiscard bytes from this channel until a -2 read result is encountered.ArrayOps<byte[]> longlongprotected intonBlockEnd(ByteBuffer dst, long oldPos, long newPos) longposition()intread(byte[] array, int position, int length) Methods inherited from class ChannelBase
isOpenMethods inherited from class org.aksw.commons.util.closeable.AutoCloseableWithLeakDetectionBase
finalize, getInstantiationStackTraceMethods inherited from class org.aksw.commons.util.closeable.AutoCloseableBase
close, closeActual, ensureOpen, throwClosedExceptionMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ReadableSource
readRaw
-
Field Details
-
decodedIn
-
seekable
protected org.apache.hadoop.fs.Seekable seekable -
startPos
protected long startPos -
currentPos
protected long currentPos -
buffer
protected byte[] buffer -
pendingByte
protected byte pendingByte -
pendingByteState
protected int pendingByteState -
endOfBlockMarker
protected int endOfBlockMarker -
readCount
protected long readCount
-
-
Constructor Details
-
ReadableChannelWithBlockAdvertisementBuffered
- Throws:
IOException
-
ReadableChannelWithBlockAdvertisementBuffered
public ReadableChannelWithBlockAdvertisementBuffered(InputStream decodedIn, int endOfBlockMarker) throws IOException - Throws:
IOException
-
-
Method Details
-
position
- Throws:
IOException
-
getStartPos
public long getStartPos() -
getCurrentPos
public long getCurrentPos() -
read
- Throws:
IOException
-
onBlockEnd
-
getArrayOps
-
adjustToNextBlock
Discard bytes from this channel until a -2 read result is encountered.- Throws:
IOException
-