|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.squawk.Unsafe
public final class Unsafe
A collection of methods for performing peek and poke operations on memory addresses.
| Method Summary | |
|---|---|
static Address |
getAddress(Object base,
int offset)
Gets a pointer from memory as an Address. |
static int |
getAsByte(Object base,
int offset)
Gets a signed 8 bit value from memory ignoring any recorded type of the value at the designated location. |
static int |
getAsInt(Object base,
int offset)
Gets a signed 32 bit value from memory ignoring any recorded type of the value at the designated location. |
static int |
getAsShort(Object base,
int offset)
Gets a signed 16 bit value from memory ignoring any recorded type of the value at the designated location. |
static UWord |
getAsUWord(Object base,
int offset)
Gets a UWord value from memory ignoring any recorded type of the value at the designated location. |
static int |
getByte(Object base,
int offset)
Gets a signed 8 bit value from memory. |
static int |
getChar(Object base,
int offset)
Gets an unsigned 16 bit value from memory. |
static int |
getInt(Object base,
int offset)
Gets a signed 32 bit value from memory. |
static long |
getLong(Object base,
int offset)
Gets a 64 bit value from memory using a 64 bit word offset. |
static long |
getLongAtWord(Object base,
int offset)
Gets a 64 bit value from memory using a 32 bit word offset. |
static Object |
getObject(Object base,
int offset)
Gets a pointer from memory as an Object. |
static int |
getShort(Object base,
int offset)
Gets a signed 16 bit value from memory. |
static UWord |
getUWord(Object base,
int offset)
Gets an unsigned 32 or 64 bit value from memory. |
static void |
setAddress(Object base,
int offset,
Object value)
Sets a pointer value in memory without updating the write barrier. |
static void |
setByte(Object base,
int offset,
int value)
Sets an 8 bit value in memory. |
static void |
setChar(Object base,
int offset,
int value)
Sets an unsigned 16 bit value in memory. |
static void |
setInt(Object base,
int offset,
int value)
Sets a 32 bit value in memory. |
static void |
setLong(Object base,
int offset,
long value)
Sets a 64 bit value in memory. |
static void |
setLongAtWord(Object base,
int offset,
long value)
Sets a 64 bit value in memory at a 32 bit word offset. |
static void |
setObject(Object base,
int offset,
Object value)
Sets a pointer value in memory and updates the write barrier. |
static void |
setShort(Object base,
int offset,
int value)
Sets a signed 16 bit value in memory. |
static void |
setUWord(Object base,
int offset,
UWord value)
Sets a UWord value in memory. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void setByte(Object base,
int offset,
int value)
base - the base addressoffset - the offset (in bytes) from base at which to writevalue - the value to write
public static void setShort(Object base,
int offset,
int value)
base - the base addressoffset - the offset (in 16 bit words) from base at which to writevalue - the value to write
public static void setChar(Object base,
int offset,
int value)
base - the base addressoffset - the offset (in 16 bit words) from base at which to writevalue - the value to write
public static void setInt(Object base,
int offset,
int value)
base - the base addressoffset - the offset (in 32 bit words) from base at which to writevalue - the value to write
public static void setUWord(Object base,
int offset,
UWord value)
base - the base addressoffset - the offset (in UWords) from base at which to writevalue - the value to write
public static void setLong(Object base,
int offset,
long value)
base - the base addressoffset - the offset (in 64 bit words) from base at which to writevalue - the value to write
public static void setLongAtWord(Object base,
int offset,
long value)
base - the base addressoffset - the offset (in 32 bit words) from base at which to writevalue - the value to write
public static void setAddress(Object base,
int offset,
Object value)
hosted environment then the corresponding bit in the
oop map (if any) is also set.
base - the base addressoffset - the offset (in UWords) from base at which to writevalue - the value to write
public static void setObject(Object base,
int offset,
Object value)
base - the base addressoffset - the offset (in UWords) from base at which to writevalue - the value to write
public static int getByte(Object base,
int offset)
base - the base addressoffset - the offset (in bytes) from base from which to load
public static int getShort(Object base,
int offset)
base - the base addressoffset - the offset (in 16 bit words) from base from which to load
public static int getChar(Object base,
int offset)
base - the base addressoffset - the offset (in 16 bit words) from base from which to load
public static int getInt(Object base,
int offset)
base - the base addressoffset - the offset (in 32 bit words) from base from which to load
public static UWord getUWord(Object base,
int offset)
base - the base addressoffset - the offset (in UWords) from base from which to load
public static long getLong(Object base,
int offset)
base - the base addressoffset - the offset (in 64 bit words) from base from which to load
public static long getLongAtWord(Object base,
int offset)
base - the base addressoffset - the offset (in 32 bit words) from base from which to load
public static Object getObject(Object base,
int offset)
base - the base addressoffset - the offset (in UWords) from base from which to load
public static Address getAddress(Object base,
int offset)
base - the base addressoffset - the offset (in UWords) from base from which to load
public static UWord getAsUWord(Object base,
int offset)
getUWord(Object, int) when runtime type checking
is disabled.
base - the base addressoffset - the offset (in words) from base from which to load
public static int getAsByte(Object base,
int offset)
getByte(Object, int) when runtime type checking
is disabled.
base - the base addressoffset - the offset (in 8 bit words) from base from which to load
public static int getAsShort(Object base,
int offset)
getShort(Object, int) when runtime type checking
is disabled.
base - the base addressoffset - the offset (in 16 bit words) from base from which to load
public static int getAsInt(Object base,
int offset)
getInt(Object, int) when runtime type checking
is disabled.
base - the base addressoffset - the offset (in 32 bit words) from base from which to load
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||