public class Cursor extends Object
| Modifier and Type | Field and Description |
|---|---|
protected long |
base
Where "zero" is for this buffer in absolute coordinates (e.g.
|
protected long |
off
The current offset into this buffer
|
protected long |
origin
Needed to get Streamers working
|
| Constructor and Description |
|---|
Cursor(BackingBuf impl,
long base) |
| Modifier and Type | Method and Description |
|---|---|
Cursor |
duplicate() |
long |
getBase() |
long |
getLimit() |
long |
getOffset() |
Cursor |
getOldestParent() |
long |
getOrigin() |
Cursor |
getParent() |
Cursor |
getPossiblyCompressedSubcursor(long off,
int compressedLen,
int uncompressedLen,
int keyLen)
Gets a subcursor that might be compressed.
|
Cursor |
getSubcursor(long off) |
ByteBuffer |
readBuffer(long len) |
ByteBuffer |
readBuffer(long offset,
long len) |
byte |
readChar() |
byte |
readChar(long offset) |
String |
readCString() |
String |
readCString(long offset) |
double |
readDouble() |
double |
readDouble(long offset) |
double[] |
readDoubleArray(int len) |
float |
readFloat() |
float |
readFloat(long offset) |
int |
readInt() |
int |
readInt(long offset) |
int[] |
readIntArray(int len) |
long |
readLong() |
long |
readLong(long offset) |
long[] |
readLongArray(int len) |
short |
readShort() |
short |
readShort(long offset) |
String |
readTString() |
String |
readTString(long offset) |
short |
readUChar() |
short |
readUChar(long offset) |
long |
readUInt() |
long |
readUInt(long offset) |
BigInteger |
readULong() |
BigInteger |
readULong(long offset) |
int |
readUShort() |
int |
readUShort(long offset) |
void |
setOffset(long newoff) |
void |
skipBytes(long amount) |
void |
startCheck() |
protected long base
protected long origin
protected long off
public Cursor(BackingBuf impl, long base)
public Cursor getParent()
public Cursor getOldestParent()
public Cursor duplicate()
public Cursor getSubcursor(long off)
public long getOrigin()
public long getBase()
public long getLimit()
throws IOException
IOExceptionpublic void startCheck()
throws IOException
IOExceptionpublic Cursor getPossiblyCompressedSubcursor(long off, int compressedLen, int uncompressedLen, int keyLen)
off - Beginning of this possibly compressed byterangecompressedLen - Length of this byterange in the parentuncompressedLen - Length of this byterange after (possible) decompressionkeyLen - length of the key to skippublic long getOffset()
public void setOffset(long newoff)
public void skipBytes(long amount)
public ByteBuffer readBuffer(long offset, long len) throws IOException
IOExceptionpublic ByteBuffer readBuffer(long len) throws IOException
IOExceptionpublic byte readChar(long offset)
throws IOException
IOExceptionpublic byte readChar()
throws IOException
IOExceptionpublic short readUChar(long offset)
throws IOException
IOExceptionpublic short readUChar()
throws IOException
IOExceptionpublic short readShort(long offset)
throws IOException
IOExceptionpublic short readShort()
throws IOException
IOExceptionpublic int readUShort(long offset)
throws IOException
IOExceptionpublic int readUShort()
throws IOException
IOExceptionpublic int readInt(long offset)
throws IOException
IOExceptionpublic int readInt()
throws IOException
IOExceptionpublic int[] readIntArray(int len)
throws IOException
IOExceptionpublic long readUInt(long offset)
throws IOException
IOExceptionpublic long readUInt()
throws IOException
IOExceptionpublic long readLong(long offset)
throws IOException
IOExceptionpublic long readLong()
throws IOException
IOExceptionpublic long[] readLongArray(int len)
throws IOException
IOExceptionpublic BigInteger readULong(long offset) throws IOException
IOExceptionpublic BigInteger readULong() throws IOException
IOExceptionpublic float readFloat(long offset)
throws IOException
IOExceptionpublic float readFloat()
throws IOException
IOExceptionpublic double readDouble(long offset)
throws IOException
IOExceptionpublic double readDouble()
throws IOException
IOExceptionpublic double[] readDoubleArray(int len)
throws IOException
IOExceptionpublic String readTString(long offset) throws IOException
IOExceptionpublic String readTString() throws IOException
IOExceptionpublic String readCString(long offset) throws IOException
IOExceptionpublic String readCString() throws IOException
IOExceptionCopyright © 2019. All rights reserved.