Package org.terrier.compression.bit
Class ConcurrentBitFileBuffered
- java.lang.Object
-
- org.terrier.compression.bit.BitFileBuffered
-
- org.terrier.compression.bit.ConcurrentBitFileBuffered
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,BitInSeekable
public class ConcurrentBitFileBuffered extends BitFileBuffered
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classConcurrentBitFileBuffered.ConcurrentBitInBuffered-
Nested classes/interfaces inherited from class org.terrier.compression.bit.BitFileBuffered
BitFileBuffered.BitInBuffered
-
-
Field Summary
-
Fields inherited from class org.terrier.compression.bit.BitFileBuffered
buffer_size, DEFAULT_BUFFER_LENGTH, fileSize, logger
-
-
Constructor Summary
Constructors Constructor Description ConcurrentBitFileBuffered(java.io.File _file)ConcurrentBitFileBuffered(java.io.File _file, int bufSize)ConcurrentBitFileBuffered(java.lang.String filename)ConcurrentBitFileBuffered(java.lang.String filename, int bufSize)ConcurrentBitFileBuffered(RandomDataInput f)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConcurrentBitFileBufferedof(BitFileBuffered old)BitInreadReset(long startByteOffset, byte startBitOffset)Reads from the file from a specific offset.BitInreadReset(long startByteOffset, byte startBitOffset, long endByteOffset, byte endBitOffset)Reads from the file a specific number of bytes and after this call, a sequence of read calls may follow.-
Methods inherited from class org.terrier.compression.bit.BitFileBuffered
close
-
-
-
-
Constructor Detail
-
ConcurrentBitFileBuffered
public ConcurrentBitFileBuffered(java.io.File _file, int bufSize)
-
ConcurrentBitFileBuffered
public ConcurrentBitFileBuffered(java.io.File _file)
-
ConcurrentBitFileBuffered
public ConcurrentBitFileBuffered(RandomDataInput f)
-
ConcurrentBitFileBuffered
public ConcurrentBitFileBuffered(java.lang.String filename, int bufSize)
-
ConcurrentBitFileBuffered
public ConcurrentBitFileBuffered(java.lang.String filename)
-
-
Method Detail
-
of
public static ConcurrentBitFileBuffered of(BitFileBuffered old)
-
readReset
public BitIn readReset(long startByteOffset, byte startBitOffset, long endByteOffset, byte endBitOffset)
Description copied from class:BitFileBufferedReads from the file a specific number of bytes and after this call, a sequence of read calls may follow. The offsets given as arguments are inclusive. For example, if we call this method with arguments 0, 2, 1, 7, it will read in a buffer the contents of the underlying file from the third bit of the first byte to the last bit of the second byte.- Specified by:
readResetin interfaceBitInSeekable- Overrides:
readResetin classBitFileBuffered- Parameters:
startByteOffset- the starting byte to read fromstartBitOffset- the bit offset in the starting byteendByteOffset- the ending byteendBitOffset- the bit offset in the ending byte. This bit is the last bit of this entry.- Returns:
- Returns the BitIn object to use to read that data
-
readReset
public BitIn readReset(long startByteOffset, byte startBitOffset)
Description copied from class:BitFileBufferedReads from the file from a specific offset. After this call, a sequence of read calls may follow.- Specified by:
readResetin interfaceBitInSeekable- Overrides:
readResetin classBitFileBuffered- Parameters:
startByteOffset- the starting byte to read fromstartBitOffset- the bit offset in the starting byte- Returns:
- Returns the BitIn object to use to read that data
-
-