|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.realtime.RawMemoryAccess | +--javax.realtime.RawMemoryFloatAccess
This class holds the accessor methods for accessing a raw memory area by float and double types. Implementations are required to implement this class if and only if the underlying Java Virtual Machine supports floating point data types.
Many of the constructors and methods in this class throw
OffsetOutOfBoundsException
. This exception means that the
value given in the offset parameter is either negative or outside the
memory area.
Many of the constructors and methods in this class throw
SizeOutOfBoundsException
. This exception means that the value
given in the size parameter is either negative, larger than an allowable
range, or would cause an accessor method to access an address outside of
the memory area.
Constructor Summary | |
RawMemoryFloatAccess(java.lang.Object type,
long size)
Create a RawMemoryFloatAccess object. |
|
RawMemoryFloatAccess(java.lang.Object type,
long base,
long size)
Create a RawMemoryFloatAccess object. |
Method Summary | |
double |
getDouble(long offset)
Get the double at the given offset . |
void |
getDoubles(long offset,
double[] doubles,
int low,
int number)
Get number double values starting at the
given offset in this, and assigns them into the
double array starting at position low . |
float |
getFloat(long offset)
Get the float at the given offset . |
void |
getFloats(long offset,
float[] floats,
int low,
int number)
Get number float values starting at the
given offset in this and assign them into the
byte array starting at position low . |
void |
setDouble(long offset,
double value)
Set the double at the given offset . |
void |
setDoubles(long offset,
double[] doubles,
int low,
int number)
Get number double values starting at the
given offset in this, and assigns them into the
double array starting at position low . |
void |
setFloat(long offset,
float value)
Set the float at the given offset . |
void |
setFloats(long offset,
float[] floats,
int low,
int number)
Set number float values starting at the
given offset in this from the byte array
starting at position low . |
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(java.lang.Object type, long size) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedPhysicalMemoryException, MemoryTypeConflictException
RawMemoryFloatAccess
object.type
- An Object representing the type of memory required
(e.g., dma, shared) - used to define the base
address and control the mappingsize
- The size of the area in bytes.java.lang.SecurityException
- The application doesn't have
permissions to access physical memory or the given type
of memory.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type.public RawMemoryFloatAccess(java.lang.Object type, long base, long size) throws java.lang.SecurityException, OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedPhysicalMemoryException, MemoryTypeConflictException
RawMemoryFloatAccess
object.type
- An Object representing the type of memory required
(e.g., dma, shared) - used to define the base
address and control the mappingsize
- The size of the area in bytes.java.lang.SecurityException
- The application doesn't have
permissions to access physical memory or the given type
of memory.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type.Method Detail |
public double getDouble(long offset) throws OffsetOutOfBoundsException, SizeOutOfBoundsException
offset
.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.public void getDoubles(long offset, double[] doubles, int low, int number) throws OffsetOutOfBoundsException, SizeOutOfBoundsException
number
double
values starting at the
given offset
in this, and assigns them into the
double
array starting at position low
.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.public float getFloat(long offset) throws OffsetOutOfBoundsException, SizeOutOfBoundsException
offset
.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.public void getFloats(long offset, float[] floats, int low, int number) throws OffsetOutOfBoundsException, SizeOutOfBoundsException
number
float
values starting at the
given offset
in this and assign them into the
byte
array starting at position low
.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.public void setFloat(long offset, float value) throws OffsetOutOfBoundsException, SizeOutOfBoundsException
offset
.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.public void setFloats(long offset, float[] floats, int low, int number) throws OffsetOutOfBoundsException, SizeOutOfBoundsException
number
float
values starting at the
given offset
in this from the byte
array
starting at position low
.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.public void setDouble(long offset, double value) throws OffsetOutOfBoundsException, SizeOutOfBoundsException
offset
.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.public void setDoubles(long offset, double[] doubles, int low, int number) throws OffsetOutOfBoundsException, SizeOutOfBoundsException
number
double
values starting at the
given offset
in this, and assigns them into the
double
array starting at position low
.OffsetOutOfBoundsException
- The address is invalid.SizeOutOfBoundsException
- The size is negative or
extends into an invalid range of memory.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |