public class CompressedRandomAccessReader extends RandomAccessReader
RandomAccessReader.BufferedRandomAccessFileMark
DataInputPlus.DataInputStreamPlus
buffer, 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, seek
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
readUnsignedVInt, readVInt
protected 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)
RandomAccessReader
getBufferSize
in class RandomAccessReader
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class RandomAccessReader
protected void reBuffer()
RandomAccessReader
reBuffer
in class RandomAccessReader
public int getTotalBufferSize()
getTotalBufferSize
in class RandomAccessReader
public long length()
length
in class RandomAccessReader
public java.lang.String toString()
toString
in class RandomAccessReader
Copyright © 2015 The Apache Software Foundation