javax.realtime
Class RawMemoryFloatAccess

java.lang.Object
  |
  +--javax.realtime.RawMemoryAccess
        |
        +--javax.realtime.RawMemoryFloatAccess

public class RawMemoryFloatAccess
extends RawMemoryAccess

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)
           
RawMemoryFloatAccess(java.lang.Object type, long base, long size)
           
 
Method Summary
protected  void finalize()
           
 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
arrayChecks, getByte, getBytes, getInt, getInts, getLong, getLongs, getMappedAddress, getShort, getShorts, map, map, map, setByte, setBytes, setInt, setInts, setLong, setLongs, setShort, setShorts, standardChecks, unmap
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawMemoryFloatAccess

public RawMemoryFloatAccess(java.lang.Object type,
                            long size)
                     throws java.lang.SecurityException,
                            OffsetOutOfBoundsException,
                            SizeOutOfBoundsException,
                            UnsupportedPhysicalMemoryException,
                            MemoryTypeConflictException

RawMemoryFloatAccess

public RawMemoryFloatAccess(java.lang.Object type,
                            long base,
                            long size)
                     throws java.lang.SecurityException,
                            OffsetOutOfBoundsException,
                            SizeOutOfBoundsException,
                            UnsupportedPhysicalMemoryException,
                            MemoryTypeConflictException
Method Detail

getDouble

public double getDouble(long offset)
                 throws OffsetOutOfBoundsException,
                        SizeOutOfBoundsException
Get the double at the given offset.
Throws:
OffsetOutOfBoundsException - The address is invalid.
SizeOutOfBoundsException - The size is negative or extends into an invalid range of memory.

getDoubles

public void getDoubles(long offset,
                       double[] doubles,
                       int low,
                       int number)
                throws OffsetOutOfBoundsException,
                       SizeOutOfBoundsException
Get number double values starting at the given offset in this, and assigns them into the double array starting at position low.
Throws:
OffsetOutOfBoundsException - The address is invalid.
SizeOutOfBoundsException - The size is negative or extends into an invalid range of memory.

getFloat

public float getFloat(long offset)
               throws OffsetOutOfBoundsException,
                      SizeOutOfBoundsException
Get the float at the given offset.
Throws:
OffsetOutOfBoundsException - The address is invalid.
SizeOutOfBoundsException - The size is negative or extends into an invalid range of memory.

getFloats

public void getFloats(long offset,
                      float[] floats,
                      int low,
                      int number)
               throws OffsetOutOfBoundsException,
                      SizeOutOfBoundsException
Get number float values starting at the given offset in this and assign them into the byte array starting at position low.
Throws:
OffsetOutOfBoundsException - The address is invalid.
SizeOutOfBoundsException - The size is negative or extends into an invalid range of memory.

setFloat

public void setFloat(long offset,
                     float value)
              throws OffsetOutOfBoundsException,
                     SizeOutOfBoundsException
Set the float at the given offset.
Throws:
OffsetOutOfBoundsException - The address is invalid.
SizeOutOfBoundsException - The size is negative or extends into an invalid range of memory.

setFloats

public void setFloats(long offset,
                      float[] floats,
                      int low,
                      int number)
               throws OffsetOutOfBoundsException,
                      SizeOutOfBoundsException
Set number float values starting at the given offset in this from the byte array starting at position low.
Throws:
OffsetOutOfBoundsException - The address is invalid.
SizeOutOfBoundsException - The size is negative or extends into an invalid range of memory.

setDouble

public void setDouble(long offset,
                      double value)
               throws OffsetOutOfBoundsException,
                      SizeOutOfBoundsException
Set the double at the given offset.
Throws:
OffsetOutOfBoundsException - The address is invalid.
SizeOutOfBoundsException - The size is negative or extends into an invalid range of memory.

setDoubles

public void setDoubles(long offset,
                       double[] doubles,
                       int low,
                       int number)
                throws OffsetOutOfBoundsException,
                       SizeOutOfBoundsException
Get number double values starting at the given offset in this, and assigns them into the double array starting at position low.
Throws:
OffsetOutOfBoundsException - The address is invalid.
SizeOutOfBoundsException - The size is negative or extends into an invalid range of memory.

finalize

protected void finalize()
Overrides:
finalize in class RawMemoryAccess