public class ByteBufferDataAccess extends BaseDataAccess
| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer[] |
buffers |
currentPosition, DEFAULT_SEGMENT_SIZE, segmentSize, segmentSizeDivisor, segmentSizePower| Constructor and Description |
|---|
ByteBufferDataAccess() |
ByteBufferDataAccess(int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
ensureCapacity(long bytes) |
byte |
getByte(long bytePos) |
long |
getCapacity() |
char |
getChar(long bytePos)
Absolute get method for reading a char value.
|
double |
getDouble(long bytePos) |
float |
getFloat(long bytePos) |
int |
getInt(long bytePos) |
long |
getLong(long bytePos) |
short |
getShort(long bytePos) |
void |
setByte(long bytePos,
byte element) |
void |
setChar(long bytePos,
char element)
Absolute put method for writing a char value (optional operation).
|
void |
setDouble(long bytePos,
double element) |
void |
setFloat(long bytePos,
float element) |
void |
setInt(long bytePos,
int element) |
void |
setLong(long bytePos,
long element) |
void |
setShort(long bytePos,
short element) |
getByte, getChar, getCurrentPosition, getDouble, getFloat, getInt, getLong, getShort, isEmpty, setByte, setChar, setCurrentPosition, setDouble, setFloat, setInt, setLong, setSegmentSize, setShortprotected ByteBuffer[] buffers
public ByteBufferDataAccess()
public ByteBufferDataAccess(int bufferSize)
public void ensureCapacity(long bytes)
public long getCapacity()
public byte getByte(long bytePos)
public void setByte(long bytePos,
byte element)
public char getChar(long bytePos)
DataAccessbytePos - The index (byte position) from which the bytes will be readpublic void setChar(long bytePos,
char element)
DataAccessbytePos - The index at which the bytes will be writtenelement - The char value to be writtenpublic short getShort(long bytePos)
public void setShort(long bytePos,
short element)
public int getInt(long bytePos)
public void setInt(long bytePos,
int element)
public long getLong(long bytePos)
public void setLong(long bytePos,
long element)
public float getFloat(long bytePos)
public void setFloat(long bytePos,
float element)
public double getDouble(long bytePos)
public void setDouble(long bytePos,
double element)
public void close()
Copyright © 2017. All rights reserved.