public class CheckedMemorySegment extends Object
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
memory
The array in which the data is stored.
|
protected int |
offset
The offset in the memory array where this segment starts.
|
protected int |
size
The size of the memory segment.
|
protected ByteBuffer |
wrapper
Wrapper for I/O requests.
|
| Constructor and Description |
|---|
CheckedMemorySegment(byte[] memory) |
| Modifier and Type | Method and Description |
|---|---|
CheckedMemorySegment |
get(DataOutput out,
int offset,
int length) |
byte |
get(int index) |
CheckedMemorySegment |
get(int index,
byte[] dst) |
CheckedMemorySegment |
get(int index,
byte[] dst,
int offset,
int length) |
byte[] |
getBackingArray() |
boolean |
getBoolean(int index) |
char |
getChar(int index) |
double |
getDouble(int index) |
float |
getFloat(int index) |
int |
getInt(int index) |
int |
getIntBigEndian(int index) |
int |
getIntLittleEndian(int index) |
long |
getLong(int index) |
long |
getLongBigEndian(int index) |
long |
getLongLittleEndian(int index) |
short |
getShort(int index) |
boolean |
isFreed() |
CheckedMemorySegment |
put(DataInput in,
int offset,
int length) |
CheckedMemorySegment |
put(int index,
byte b) |
CheckedMemorySegment |
put(int index,
byte[] src) |
CheckedMemorySegment |
put(int index,
byte[] src,
int offset,
int length) |
CheckedMemorySegment |
putBoolean(int index,
boolean value) |
CheckedMemorySegment |
putChar(int index,
char value) |
CheckedMemorySegment |
putDouble(int index,
double value) |
CheckedMemorySegment |
putFloat(int index,
float value) |
void |
putInt(int index,
int value) |
void |
putIntBigEndian(int index,
int value) |
void |
putIntLittleEndian(int index,
int value) |
void |
putLong(int index,
long value) |
void |
putLongBigEndian(int index,
long value) |
void |
putLongLittleEndian(int index,
long value) |
CheckedMemorySegment |
putShort(int index,
short value) |
int |
size() |
int |
translateOffset(int offset) |
ByteBuffer |
wrap(int offset,
int length) |
protected byte[] memory
protected final int offset
protected final int size
protected ByteBuffer wrapper
public boolean isFreed()
public final int size()
public final byte[] getBackingArray()
public final int translateOffset(int offset)
public ByteBuffer wrap(int offset, int length)
public final byte get(int index)
public final CheckedMemorySegment put(int index, byte b)
public final CheckedMemorySegment get(int index, byte[] dst)
public final CheckedMemorySegment put(int index, byte[] src)
public final CheckedMemorySegment get(int index, byte[] dst, int offset, int length)
public final CheckedMemorySegment put(int index, byte[] src, int offset, int length)
public final CheckedMemorySegment get(DataOutput out, int offset, int length) throws IOException
IOExceptionpublic final CheckedMemorySegment put(DataInput in, int offset, int length) throws IOException
IOExceptionpublic final boolean getBoolean(int index)
public final CheckedMemorySegment putBoolean(int index, boolean value)
public final char getChar(int index)
public final CheckedMemorySegment putChar(int index, char value)
public final short getShort(int index)
public final CheckedMemorySegment putShort(int index, short value)
public final int getInt(int index)
public final int getIntLittleEndian(int index)
public final int getIntBigEndian(int index)
public final void putInt(int index,
int value)
public final void putIntLittleEndian(int index,
int value)
public final void putIntBigEndian(int index,
int value)
public final long getLong(int index)
public final long getLongLittleEndian(int index)
public final long getLongBigEndian(int index)
public final void putLong(int index,
long value)
public final void putLongLittleEndian(int index,
long value)
public final void putLongBigEndian(int index,
long value)
public final float getFloat(int index)
public final CheckedMemorySegment putFloat(int index, float value)
public final double getDouble(int index)
public final CheckedMemorySegment putDouble(int index, double value)
Copyright © 2015 The Apache Software Foundation. All rights reserved.