|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.realtime.RawMemoryAccess
javax.realtime.RawMemoryFloatAccess
This class extends the capabilities of RawMemoryAccess by
additionally supporting the interpretation of raw memory as float
and double types.
| Constructor Summary | |
RawMemoryFloatAccess(Object type,
long size)
Constructs a raw memory accessor associated to a memory area of the given memory type and size. |
|
RawMemoryFloatAccess(Object type,
long base,
long size)
Constructs a raw memory accessor associated to a memory area of the given memory type and size, based at the given offset. |
|
| Method Summary | |
double |
getDouble(long offset)
Get the double at the given offset. |
void |
getDoubles(long offset,
double[] doubles,
int low,
int number)
Get a consecutive sequence of doubles at the given offset. |
float |
getFloat(long offset)
Get the float at the given offset. |
void |
getFloats(long offset,
float[] floats,
int low,
int number)
Get a consecutive sequence of floats at the given offset. |
void |
setDouble(long offset,
double value)
Set the double at the given offset. |
void |
setDoubles(long offset,
double[] doubles,
int low,
int number)
Set a consecutive sequence of doubles at the given offset. |
void |
setFloat(long offset,
float value)
Set the float at the given offset. |
void |
setFloats(long offset,
float[] floats,
int low,
int number)
Set a consecutive sequence of floats at the given offset. |
| Methods inherited from class javax.realtime.RawMemoryAccess |
getByte, getBytes, getInt, getInts, getLong, getLongs, getMappedAddress, getShort, getShorts, map, map, map, setByte, setBytes, setInt, setInts, setLong, setLongs, setShort, setShorts, unmap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RawMemoryFloatAccess(Object type,
long size)
type - the memory typesize - the size of the memory area
SecurityException - the current execution context does
not have permission to access physical memory, or memory of the
given type
OffsetOutOfBoundsException - this exception is never
thrown; it is in the signature to be spec-compliant
SizeOutOfBoundsException - the size is negative or too
large
UnsupportedPhysicalMemoryException - the hardware does
not support this type of memory
MemoryTypeConflictException - the type parameter's
attributes conflict with each other
public RawMemoryFloatAccess(Object type,
long base,
long size)
type - the memory typebase - the base offset of the memory areasize - the size of the memory area
SecurityException - the current execution context does
not have permission to access physical memory, or memory of the
given type
OffsetOutOfBoundsException - this exception is never
thrown; it is in the signature to be spec-compliant
SizeOutOfBoundsException - the size is negative or too
large
UnsupportedPhysicalMemoryException - the hardware does
not support this type of memory
MemoryTypeConflictException - the type parameter's
attributes conflict with each other or with the specified base
offset| Method Detail |
public double getDouble(long offset)
offset - the memory offset to access
OffsetOutOfBoundsException - the given offset is negative
or outside the range of this raw memory area
SizeOutOfBoundsException - satisfying the request would
require accessing storage beyond the end of the memory area
public void getDoubles(long offset,
double[] doubles,
int low,
int number)
offset - the memory offset to accessdoubles - the array to copy doubles intolow - the offset into the array at which to start copyingnumber - the number of doubles to copy
OffsetOutOfBoundsException - the given offset is negative
or outside the range of this raw memory area
SizeOutOfBoundsException - satisfying the request would
require accessing storage beyond the end of the memory areapublic float getFloat(long offset)
offset - the memory offset to access
OffsetOutOfBoundsException - the given offset is negative
or outside the range of this raw memory area
SizeOutOfBoundsException - satisfying the request would
require accessing storage beyond the end of the memory area
public void getFloats(long offset,
float[] floats,
int low,
int number)
offset - the memory offset to accessfloats - the array to copy floats intolow - the offset into the array at which to start copyingnumber - the number of floats to copy
OffsetOutOfBoundsException - the given offset is negative
or outside the range of this raw memory area
SizeOutOfBoundsException - satisfying the request would
require accessing storage beyond the end of the memory area
public void setDouble(long offset,
double value)
offset - the memory offset to accessvalue - the value to assign the double in memory
OffsetOutOfBoundsException - the given offset is negative
or outside the range of this raw memory area
SizeOutOfBoundsException - satisfying the request would
require accessing storage beyond the end of the memory area
public void setDoubles(long offset,
double[] doubles,
int low,
int number)
offset - the memory offset to accessdoubles - the array to copy doubles fromlow - the offset into the array at which to start copyingnumber - the number of doubles to copy
OffsetOutOfBoundsException - the given offset is negative
or outside the range of this raw memory area
SizeOutOfBoundsException - satisfying the request would
require accessing storage beyond the end of the memory area
public void setFloat(long offset,
float value)
offset - the memory offset to accessvalue - the value to assign the float in memory
OffsetOutOfBoundsException - the given offset is negative
or outside the range of this raw memory area
SizeOutOfBoundsException - satisfying the request would
require accessing storage beyond the end of the memory area
public void setFloats(long offset,
float[] floats,
int low,
int number)
offset - the memory offset to accessfloats - the array to copy floats fromlow - the offset into the array at which to start copyingnumber - the number of floats to copy
OffsetOutOfBoundsException - the given offset is negative
or outside the range of this raw memory area
SizeOutOfBoundsException - satisfying the request would
require accessing storage beyond the end of the memory area
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||