public class CompressedRandomAccessReader extends RandomAccessReader
RandomAccessReader.BufferedRandomAccessFileMarkDataInputPlus.DataInputStreamPlusbuffer, bufferOffset, channel, DEFAULT_BUFFER_SIZE, markedPointer| Modifier | Constructor and Description |
|---|---|
protected |
CompressedRandomAccessReader(ChannelProxy channel,
CompressionMetadata metadata,
ICompressedFile file) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected int |
getBufferSize(int size)
The buffer size is typically already page aligned but if that is not the case
make sure that it is a multiple of the page size, 4096.
|
int |
getTotalBufferSize() |
long |
length() |
static CompressedRandomAccessReader |
open(ChannelProxy channel,
CompressionMetadata metadata) |
static CompressedRandomAccessReader |
open(ICompressedFile file) |
protected void |
reBuffer()
Read data from file starting from current currentOffset to populate buffer.
|
java.lang.String |
toString() |
allocateBuffer, bytesPastMark, bytesPastMark, bytesRemaining, current, getChannel, getFilePointer, getPath, getPosition, getPositionLimit, isEOF, mark, open, open, open, read, read, read, readBytes, reset, reset, seekreadBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitreadUnsignedVInt, readVIntprotected CompressedRandomAccessReader(ChannelProxy channel, CompressionMetadata metadata, ICompressedFile file)
public static CompressedRandomAccessReader open(ChannelProxy channel, CompressionMetadata metadata)
public static CompressedRandomAccessReader open(ICompressedFile file)
protected int getBufferSize(int size)
RandomAccessReadergetBufferSize in class RandomAccessReaderpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class RandomAccessReaderprotected void reBuffer()
RandomAccessReaderreBuffer in class RandomAccessReaderpublic int getTotalBufferSize()
getTotalBufferSize in class RandomAccessReaderpublic long length()
length in class RandomAccessReaderpublic java.lang.String toString()
toString in class RandomAccessReaderCopyright © 2015 The Apache Software Foundation