public static class CachableBlockFile.CachedBlockRead extends CachableBlockFile.BlockRead
in
Constructor and Description |
---|
CachedBlockRead(CacheEntry cb,
byte[] buf) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBuffer()
The byte array returned by this method is only for read optimizations, it should not be modified.
|
<T> T |
getIndex(Class<T> clazz) |
int |
getPosition()
Get the file position.
|
boolean |
isIndexable()
An indexable block supports seeking, getting a position, and associating an arbitrary index with the block
|
void |
seek(int position) |
getStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
available, close, mark, markSupported, read, reset, skip
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
public CachedBlockRead(CacheEntry cb, byte[] buf)
public void seek(int position)
seek
in interface ABlockReader
seek
in class CachableBlockFile.BlockRead
public int getPosition()
ABlockReader
getPosition
in interface ABlockReader
getPosition
in class CachableBlockFile.BlockRead
public boolean isIndexable()
ABlockReader
isIndexable
in interface ABlockReader
isIndexable
in class CachableBlockFile.BlockRead
public byte[] getBuffer()
CachableBlockFile.BlockRead
getBuffer
in interface ABlockReader
getBuffer
in class CachableBlockFile.BlockRead
public <T> T getIndex(Class<T> clazz)
getIndex
in interface ABlockReader
getIndex
in class CachableBlockFile.BlockRead
Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.