Package org.terrier.compression.bit
Class BitFileChannel.FileChannelBitInBuffered
- java.lang.Object
-
- org.terrier.compression.bit.BitInBase
-
- org.terrier.compression.bit.BitFileBuffered.BitInBuffered
-
- org.terrier.compression.bit.BitFileChannel.FileChannelBitInBuffered
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,BitIn
- Enclosing class:
- BitFileChannel
protected static class BitFileChannel.FileChannelBitInBuffered extends BitFileBuffered.BitInBuffered
-
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.ByteBuffer
buf
protected java.nio.channels.FileChannel
channel
-
Fields inherited from class org.terrier.compression.bit.BitFileBuffered.BitInBuffered
inBuffer, parentFile, readByteOffset, size
-
Fields inherited from interface org.terrier.compression.bit.BitIn
USUAL_EXTENSION
-
-
Constructor Summary
Constructors Constructor Description FileChannelBitInBuffered(java.nio.channels.FileChannel file, long startByteOffset, byte _bitOffset, int _bufLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
incrByte()
Move forward one byteprotected void
incrByte(int i)
Move forward i bytesvoid
skipBytes(long len)
Skip a number of bytes while reading the bit file.-
Methods inherited from class org.terrier.compression.bit.BitFileBuffered.BitInBuffered
close
-
Methods inherited from class org.terrier.compression.bit.BitInBase
align, getBitOffset, getByteOffset, readBinary, readDelta, readGamma, readGolomb, readIn, readInterpolativeCoding, readMinimalBinary, readMinimalBinaryZero, readSkewedGolomb, readUnary, skipBits
-
-
-
-
Method Detail
-
incrByte
protected void incrByte()
Description copied from class:BitFileBuffered.BitInBuffered
Move forward one byte- Overrides:
incrByte
in classBitFileBuffered.BitInBuffered
-
incrByte
protected void incrByte(int i)
Description copied from class:BitFileBuffered.BitInBuffered
Move forward i bytes- Overrides:
incrByte
in classBitFileBuffered.BitInBuffered
-
skipBytes
public void skipBytes(long len) throws java.io.IOException
Description copied from class:BitFileBuffered.BitInBuffered
Skip a number of bytes while reading the bit file. After this opteration, getBitOffset() == 0, so use skipBits(int) to get getBitOffset() to desired value.- Specified by:
skipBytes
in interfaceBitIn
- Overrides:
skipBytes
in classBitFileBuffered.BitInBuffered
- Parameters:
len
- The number of bytes to skip- Throws:
java.io.IOException
- if an I/O error occurs
-
-