Modifier and Type | Field and Description |
---|---|
private final long | |
protected long | |
private static ByteOrder | |
private static int | pageSize
Cache for page size. |
protected static final Unsafe |
Access | Constructor and Description |
---|---|
pack-priv | |
pack-priv | NativeObject(long address, long offset)
Creates a new native object allocated at the given native address but whose base is at the additional offset. |
protected |
Modifier and Type | Method and Description |
---|---|
pack-priv long | |
pack-priv static int | Returns: The address size of the native architectureReturns the native architecture's address size in bytes. |
pack-priv long | |
pack-priv static ByteOrder | Returns: An instance ofjava. Returns the byte order of the underlying hardware. |
pack-priv final byte | Returns: The byte value readThe offset at which to read the byte offset)Reads a byte starting at the given offset from base of this native object. |
pack-priv final char | Returns: The char value readThe offset at which to read the char offset)Reads a char starting at the given offset from base of this native object. |
pack-priv final double | Returns: The double value readThe offset at which to read the double offset)Reads a double starting at the given offset from base of this native object. |
pack-priv final float | Returns: The float value readThe offset at which to read the float offset)Reads a float starting at the given offset from base of this native object. |
pack-priv final int | Returns: The int value readThe offset at which to read the int offset)Reads an int starting at the given offset from base of this native object. |
pack-priv final long | Returns: The long value readThe offset at which to read the long offset)Reads a long starting at the given offset from base of this native object. |
pack-priv NativeObject | Returns: The native object created using the address read from the given offsetThe offset of the address to be read. Note that the size of an
address is implementation-dependent. offset)Reads an address from this native object at the given offset and constructs a native object using that address. |
pack-priv final short | Returns: The short value readThe offset at which to read the short offset)Reads a short starting at the given offset from base of this native object. |
pack-priv static int | |
pack-priv final void | putByte(int
The offset at which to write the byte offset, byte The byte value to be written value)Writes a byte at the specified offset from this native object's base address. |
pack-priv final void | putChar(int
The offset at which to write the char offset, char The char value to be written value)Writes a char at the specified offset from this native object's base address. |
pack-priv final void | putDouble(int
The offset at which to write the double offset, double The double value to be written value)Writes a double at the specified offset from this native object's base address. |
pack-priv final void | putFloat(int
The offset at which to write the float offset, float The float value to be written value)Writes a float at the specified offset from this native object's base address. |
pack-priv final void | putInt(int
The offset at which to write the int offset, int The int value to be written value)Writes an int at the specified offset from this native object's base address. |
pack-priv final void | putLong(int
The offset at which to write the long offset, long The long value to be written value)Writes a long at the specified offset from this native object's base address. |
pack-priv void | putObject(int
The offset at which the address is to be written. Note that the
size of an address is implementation-dependent. offset, NativeObject The native object whose address is to be written ob)Writes the base address of the given native object at the given offset of this native object. |
pack-priv final void | putShort(int
The offset at which to write the short offset, short The short value to be written value)Writes a short at the specified offset from this native object's base address. |
pack-priv NativeObject | Returns: The newly created native objectThe offset from the base of this native object that is to be
the base of the new native object offset)Creates a new native object starting at the given offset from the base of this native object. |
address | back to summary |
---|---|
private final long address |
allocationAddress | back to summary |
---|---|
protected long allocationAddress |
byteOrder | back to summary |
---|---|
private static ByteOrder byteOrder |
pageSize | back to summary |
---|---|
private static int pageSize Cache for page size. Lazily initialized via a data race; safe because ints are atomic. |
unsafe | back to summary |
---|---|
protected static final Unsafe unsafe |
NativeObject | back to summary |
---|---|
pack-priv NativeObject(long address) Creates a new native object that is based at the given native address. |
NativeObject | back to summary |
---|---|
pack-priv NativeObject(long address, long offset) Creates a new native object allocated at the given native address but whose base is at the additional offset. |
NativeObject | back to summary |
---|---|
protected NativeObject(int size, boolean pageAligned) |
address | back to summary |
---|---|
pack-priv long address() Returns the native base address of this native object.
|
addressSize | back to summary |
---|---|
pack-priv static int addressSize() Returns the native architecture's address size in bytes.
|
allocationAddress | back to summary |
---|---|
pack-priv long allocationAddress() |
byteOrder | back to summary |
---|---|
pack-priv static ByteOrder byteOrder() Returns the byte order of the underlying hardware.
|
getByte | back to summary |
---|---|
pack-priv final byte getByte(int offset) Reads a byte starting at the given offset from base of this native object.
|
getChar | back to summary |
---|---|
pack-priv final char getChar(int offset) Reads a char starting at the given offset from base of this native object.
|
getDouble | back to summary |
---|---|
pack-priv final double getDouble(int offset) Reads a double starting at the given offset from base of this native object.
|
getFloat | back to summary |
---|---|
pack-priv final float getFloat(int offset) Reads a float starting at the given offset from base of this native object.
|
getInt | back to summary |
---|---|
pack-priv final int getInt(int offset) Reads an int starting at the given offset from base of this native object.
|
getLong | back to summary |
---|---|
pack-priv final long getLong(int offset) Reads a long starting at the given offset from base of this native object.
|
getObject | back to summary |
---|---|
pack-priv NativeObject getObject(int offset) Reads an address from this native object at the given offset and constructs a native object using that address.
|
getShort | back to summary |
---|---|
pack-priv final short getShort(int offset) Reads a short starting at the given offset from base of this native object.
|
pageSize | back to summary |
---|---|
pack-priv static int pageSize() Returns the page size of the underlying hardware.
|
putByte | back to summary |
---|---|
pack-priv final void putByte(int offset, byte value) Writes a byte at the specified offset from this native object's base address.
|
putChar | back to summary |
---|---|
pack-priv final void putChar(int offset, char value) Writes a char at the specified offset from this native object's base address.
|
putDouble | back to summary |
---|---|
pack-priv final void putDouble(int offset, double value) Writes a double at the specified offset from this native object's base address.
|
putFloat | back to summary |
---|---|
pack-priv final void putFloat(int offset, float value) Writes a float at the specified offset from this native object's base address.
|
putInt | back to summary |
---|---|
pack-priv final void putInt(int offset, int value) Writes an int at the specified offset from this native object's base address.
|
putLong | back to summary |
---|---|
pack-priv final void putLong(int offset, long value) Writes a long at the specified offset from this native object's base address.
|
putObject | back to summary |
---|---|
pack-priv void putObject(int offset, NativeObject ob) Writes the base address of the given native object at the given offset of this native object.
|
putShort | back to summary |
---|---|
pack-priv final void putShort(int offset, short value) Writes a short at the specified offset from this native object's base address.
|
subObject | back to summary |
---|---|
pack-priv NativeObject subObject(int offset) Creates a new native object starting at the given offset from the base of this native object.
|