public interface IDataRecord extends IByteArraySlice
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
asByteBuffer()
Wraps the data in the slice within a
ByteBuffer (does NOT copy
the data). |
void |
get(int srcoff,
byte[] dst)
Absolute bulk get copies
dst.length bytes from the
specified offset into the slice defined by this buffer into the caller's
array. |
void |
get(int srcoff,
byte[] dst,
int dstoff,
int dstlen)
Absolute bulk get copies the specified slice of bytes from this
buffer into the specified slice of the caller's array.
|
boolean |
getBit(long bitIndex)
Get the value of a bit.
|
byte |
getByte(int pos)
Absolute get for reading a byte value.
|
double |
getDouble(int pos) |
float |
getFloat(int pos) |
int |
getInt(int pos) |
long |
getLong(int pos) |
short |
getShort(int pos) |
void |
put(int pos,
byte[] src)
Absolute bulk put copies all bytes in the caller's array into this
buffer starting at the specified position within the slice defined by
this buffer.
|
void |
put(int dstoff,
byte[] src,
int srcoff,
int srclen)
Absolute bulk put copies the specified slice of bytes from the
caller's array into this buffer starting at the specified position within
the slice defined by this buffer.
|
void |
putByte(int pos,
byte v)
Absolute put method for writing a byte value.
|
void |
putDouble(int pos,
double d) |
void |
putFloat(int pos,
float f) |
void |
putInt(int pos,
int v) |
void |
putLong(int pos,
long v) |
void |
putShort(int pos,
short v) |
boolean |
setBit(long bitIndex,
boolean value)
Set the value of a bit.
|
IDataRecord |
slice(int aoff,
int alen)
Return a slice of the backing buffer.
|
array, len, off, toByteArray
IDataRecord slice(int aoff, int alen)
aoff
- The starting offset of the slice into this slice.alen
- The #of bytes in the slice.ByteBuffer asByteBuffer()
ByteBuffer
(does NOT copy
the data).ByteBuffer
encapsulating a reference to the data in the
slice.void put(int pos, byte[] src)
pos
- The starting position within the slice defined by this buffer.src
- The source data.void put(int dstoff, byte[] src, int srcoff, int srclen)
dstoff
- The offset into the slice to which the data will be copied.src
- The source data.srcoff
- The offset of the 1st byte in the source data to be copied.srclen
- The #of bytes to be copied.void get(int srcoff, byte[] dst)
dst.length
bytes from the
specified offset into the slice defined by this buffer into the caller's
array.srcoff
- The offset into the slice of the first byte to be copied.dst
- The array into which the data will be copied.void get(int srcoff, byte[] dst, int dstoff, int dstlen)
srcoff
- The offset into the slice defined by this buffer of the first
byte to be copied.dst
- The array into which the data will be copied.dstoff
- The offset of the first byte in that array onto which the data
will be copied.dstlen
- The #of bytes to be copied.void putByte(int pos, byte v)
pos
- The offset into the slice.v
- The value.byte getByte(int pos)
pos
- The offset into the slice.void putShort(int pos, short v)
short getShort(int pos)
void putInt(int pos, int v)
int getInt(int pos)
void putFloat(int pos, float f)
float getFloat(int pos)
void putLong(int pos, long v)
void putDouble(int pos, double d)
long getLong(int pos)
double getDouble(int pos)
boolean getBit(long bitIndex)
bitIndex
- The index of the bit, counting from the first bit position in
the slice.boolean setBit(long bitIndex, boolean value)
bitIndex
- The index of the bit, counting from the first bit position in
the slice.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.