Package org.aksw.commons.io.hadoop
Class SeekableReadableChannelWithBlockTracking<T extends SeekableByteChannel>
- java.lang.Object
-
- org.aksw.commons.io.hadoop.SeekableReadableChannelWithBlockTracking<T>
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,SeekableByteChannel,WritableByteChannel,net.sansa_stack.nio.util.SeekableByteChannelDecorator
public class SeekableReadableChannelWithBlockTracking<T extends SeekableByteChannel> extends Object implements net.sansa_stack.nio.util.SeekableByteChannelDecorator
-
-
Field Summary
Fields Modifier and Type Field Description protected NavigableMap<Long,Long>blockToSuccessorprotected longcurrentBlockprotected Tdelegateprotected intendOfBlockMarker
-
Constructor Summary
Constructors Constructor Description SeekableReadableChannelWithBlockTracking(T delegate, int endOfBlockMarker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SeekableByteChannelgetDecoratee()SeekableByteChannelposition(long newPosition)intread(ByteBuffer byteBuffer)intwrite(ByteBuffer src)
-
-
-
Field Detail
-
delegate
protected T extends SeekableByteChannel delegate
-
endOfBlockMarker
protected int endOfBlockMarker
-
currentBlock
protected long currentBlock
-
blockToSuccessor
protected NavigableMap<Long,Long> blockToSuccessor
-
-
Constructor Detail
-
SeekableReadableChannelWithBlockTracking
public SeekableReadableChannelWithBlockTracking(T delegate, int endOfBlockMarker)
-
-
Method Detail
-
getDecoratee
public SeekableByteChannel getDecoratee()
- Specified by:
getDecorateein interfacenet.sansa_stack.nio.util.SeekableByteChannelDecorator
-
read
public int read(ByteBuffer byteBuffer) throws IOException
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin interfaceSeekableByteChannel- Specified by:
readin interfacenet.sansa_stack.nio.util.SeekableByteChannelDecorator- Throws:
IOException
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
writein interfaceSeekableByteChannel- Specified by:
writein interfacenet.sansa_stack.nio.util.SeekableByteChannelDecorator- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
position
public SeekableByteChannel position(long newPosition) throws IOException
- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin interfacenet.sansa_stack.nio.util.SeekableByteChannelDecorator- Throws:
IOException
-
-