|
Oracle Java Wireless Client | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RawBlock
The RawBlock interface provides methods to access a continuous
range of physical memory (raw memory).
A RawBlock instance can be obtained from a MMIODevice instance.
index values map to physical memory addresses.
The index values are measured in bytes.
The index values are relative to the base address of the raw memory area.
The index value 0 corresponds to the base address
of raw memory area.
The byte ordering of the underlying raw memory area can be retrieved using the
MMIODevice.getByteOrdering() method.
| Method Summary | |
byte |
getByte(int index)
Reads the byte at the given index in the raw memory area associated with this object. |
void |
getBytes(int index,
byte[] dst,
int offset,
int length)
Reads bytes starting at the given index in the raw memory area associated with this object. |
int |
getInt(int index)
Reads the int at the given index in the raw memory area associated with this object. |
void |
getInts(int index,
int[] dst,
int offset,
int length)
Reads ints starting at the given index in the raw memory area associated with this object. |
long |
getLong(int index)
Reads the long at the given index in the raw memory area associated with this object. |
void |
getLongs(int index,
long[] dst,
int offset,
int length)
Reads longs starting at the given index in the raw memory area associated with this object. |
short |
getShort(int index)
Reads the short at the given index in the raw memory area associated with this object. |
void |
getShorts(int index,
short[] dst,
int offset,
int length)
Reads shorts starting at the given index in the raw memory area associated with this object. |
void |
setByte(int index,
byte value)
Writes the given byte at the given index in the raw memory area associated with this object. |
void |
setBytes(int index,
byte[] src,
int offset,
int length)
Writes bytes starting at the given index in the raw memory area associated with this object. |
void |
setInt(int index,
int value)
Writes the given int at the given index in the raw memory area associated with this object. |
void |
setInts(int index,
int[] src,
int offset,
int length)
Writes ints starting at the given index in the raw memory area associated with this object. |
void |
setLong(int index,
long value)
Writes the given long at the given index in the raw memory area associated with this object. |
void |
setLongs(int index,
long[] src,
int offset,
int length)
Writes longs starting at the given index in the raw memory area associated with this object. |
void |
setShort(int index,
short value)
Writes the given short at the given index in the raw memory area associated with this object. |
void |
setShorts(int index,
short[] src,
int offset,
int length)
Writes shorts starting at the given index in the raw memory area associated with this object. |
| Methods inherited from interface com.oracle.deviceaccess.mmio.RawMemory |
getName |
| Method Detail |
byte getByte(int index)
throws PeripheralNotAvailableException
byte at the given index in the raw memory area associated with this object.
index - the byte index in the raw memory area from which the byte will be read.
byte at the given index in the raw memory area.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void getBytes(int index,
byte[] dst,
int offset,
int length)
throws PeripheralNotAvailableException
bytes starting at the given index in the raw memory area associated with this object.
This method transfers bytes from the raw memory area into the given destination array.
Each byte is loaded from memory in a single atomic operation.
index - the byte index in the raw memory area from which the bytes will be read.dst - the array into which bytes are to be writtenoffset - the offset within the array of the first byte to be written; must be non-negative and no larger than dst.length.length - the maximum number of bytes to be written to the given array; must be non-negative and no larger than dst.length - offset.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
java.lang.IndexOutOfBoundsException - if the preconditions on the offset and length parameters do not hold.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
int getInt(int index)
throws PeripheralNotAvailableException
int at the given index in the raw memory area associated with this object.
index - the byte index in the raw memory area from which the int will be read.
int at the given index in the raw memory area.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void getInts(int index,
int[] dst,
int offset,
int length)
throws PeripheralNotAvailableException
ints starting at the given index in the raw memory area associated with this object.
This method transfers ints from the raw memory area into the given destination array.
Each byte is loaded from memory in a single atomic operation.
If the ints are aligned on natural boundaries each int is loaded from memory
in a single atomic operation. Groups of ints may be loaded together, but this is unspecified.
index - the byte index in the raw memory area from which the ints will be read.dst - the array into which ints are to be writtenoffset - the offset within the array of the first int to be written; must be non-negative and no larger than dst.length.length - the maximum number of ints to be written to the given array; must be non-negative and no larger than dst.length - offset.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
java.lang.IndexOutOfBoundsException - if the preconditions on the offset and length parameters do not hold.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
long getLong(int index)
throws PeripheralNotAvailableException
long at the given index in the raw memory area associated with this object.
If the long is aligned on a natural boundary it is always loaded from memory
in a single atomic operation. If it is not aligned on a natural boundary it may not be loaded atomically, and
the number and order of the load operations is unspecified.
index - the byte index in the raw memory area from which the long will be read.
long at the given index in the raw memory area.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void getLongs(int index,
long[] dst,
int offset,
int length)
throws PeripheralNotAvailableException
longs starting at the given index in the raw memory area associated with this object.
This method transfers longs from the raw memory area into the given destination array.
Each byte is loaded from memory in a single atomic operation.
The loads of longs are not required to be atomic even if they are located on natural boundaries.
index - the byte index in the raw memory area from which the longs will be read.dst - the array into which longs are to be writtenoffset - the offset within the array of the first long to be written; must be non-negative and no larger than dst.length.length - the maximum number of longs to be written to the given array; must be non-negative and no larger than dst.length - offset.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
java.lang.IndexOutOfBoundsException - if the preconditions on the offset and length parameters do not hold.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
short getShort(int index)
throws PeripheralNotAvailableException
short at the given index in the raw memory area associated with this object.
index - the byte index in the raw memory area from which the short will be read.
short at the given index in the raw memory area.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void getShorts(int index,
short[] dst,
int offset,
int length)
throws PeripheralNotAvailableException
shorts starting at the given index in the raw memory area associated with this object.
This method transfers shorts from the raw memory area into the given destination array.
Each byte is loaded from memory in a single atomic operation.
If the shorts are aligned on natural boundaries each short is loaded from memory
in a single atomic operation. Groups of shorts may be loaded together, but this is unspecified.
index - the byte index in the raw memory area from which the shorts will be read.dst - the array into which shorts are to be writtenoffset - the offset within the array of the first short to be written; must be non-negative and no larger than dst.length.length - the maximum number of shorts to be written to the given array; must be non-negative and no larger than dst.length - offset.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
java.lang.IndexOutOfBoundsException - if the preconditions on the offset and length parameters do not hold.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void setByte(int index,
byte value)
throws PeripheralNotAvailableException
byte at the given index in the raw memory area associated with this object.
This memory access may involve a load and a store, and it may have unspecified
effects on surrounding bytes in the presence of concurrent access.
index - the byte index in the raw memory area at which the byte will be written.value - the byte to be written at the given index in the raw memory area.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void setBytes(int index,
byte[] src,
int offset,
int length)
throws PeripheralNotAvailableException
bytes starting at the given index in the raw memory area associated with this object.
This method transfers bytes from the given source array into the raw memory area.
This memory access may involve multiple load and a store operations, and it may have unspecified
effects on surrounding bytes (even bytes in the range being stored)
in the presence of concurrent access.
index - the byte index in the raw memory area at which the bytes will be written.src - the array from which bytes are to be read.offset - the offset within the array of the first byte to be read; must be non-negative and no larger than src.length.length - the maximum number of bytes to be written to the given array; must be non-negative and no larger than src.length - offset.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
java.lang.IndexOutOfBoundsException - if the preconditions on the offset and length parameters do not hold.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void setInt(int index,
int value)
throws PeripheralNotAvailableException
int at the given index in the raw memory area associated with this object.
This memory access may involve a load and a store, and it may have unspecified
effects on surrounding bytes in the presence of concurrent access.
index - the byte index in the raw memory area from which the int will be written.value - the int to be written at the given index in the raw memory area.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void setInts(int index,
int[] src,
int offset,
int length)
throws PeripheralNotAvailableException
ints starting at the given index in the raw memory area associated with this object.
This method transfers ints from the given source array into the raw memory area.
This memory access may involve multiple load and a store operations, and it may have unspecified
effects on surrounding bytes (even bytes in the range being stored)
in the presence of concurrent access.
index - the byte index in the raw memory area at which the ints will be written.src - the array from which ints are to be read.offset - the offset within the array of the first int to be read; must be non-negative and no larger than src.length.length - the maximum number of ints to be written to the given array; must be non-negative and no larger than src.length - offset.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
java.lang.IndexOutOfBoundsException - if the preconditions on the offset and length parameters do not hold.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void setLong(int index,
long value)
throws PeripheralNotAvailableException
long at the given index in the raw memory area associated with this object.
This memory access may involve a load and a store, and it may have unspecified
effects on surrounding bytes in the presence of concurrent access.
index - the byte index in the raw memory area from which the long will be written.value - the long to be written at the given index in the raw memory area.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void setLongs(int index,
long[] src,
int offset,
int length)
throws PeripheralNotAvailableException
longs starting at the given index in the raw memory area associated with this object.
This method transfers longs from the given source array into the raw memory area.
This memory access may involve multiple load and a store operations, and it may have unspecified
effects on surrounding bytes (even bytes in the range being stored)
in the presence of concurrent access.
index - the byte index in the raw memory area at which the longs will be written.src - the array from which longs are to be read.offset - the offset within the array of the first long to be read; must be non-negative and no larger than src.length.length - the maximum number of longs to be written to the given array; must be non-negative and no larger than src.length - offset.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
java.lang.IndexOutOfBoundsException - if the preconditions on the offset and length parameters do not hold.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void setShort(int index,
short value)
throws PeripheralNotAvailableException
short at the given index in the raw memory area associated with this object.
This memory access may involve a load and a store, and it may have unspecified
effects on surrounding bytes in the presence of concurrent access.
index - the byte index in the raw memory area from which the short will be written.value - the short to be written at the given index in the raw memory area.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
void setShorts(int index,
short[] src,
int offset,
int length)
throws PeripheralNotAvailableException
shorts starting at the given index in the raw memory area associated with this object.
This method transfers shorts from the given source array into the raw memory area.
This memory access may involve multiple load and a store operations, and it may have unspecified
effects on surrounding bytes (even bytes in the range being stored)
in the presence of concurrent access.
index - the byte index in the raw memory area at which the shorts will be written.src - the array from which shorts are to be read.offset - the offset within the array of the first short to be read; must be non-negative and no larger than src.length.length - the maximum number of shorts to be written to the given array; must be non-negative and no larger than src.length - offset.
AccessOutOfBoundsException - if index would result in pointing outside the raw memory area associated with this object.
java.lang.IndexOutOfBoundsException - if the preconditions on the offset and length parameters do not hold.
PeripheralNotAvailableException - if the peripheral is not currently available (has been released).
|
Oracle Java Wireless Client | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||