// ************************************************************************ // $Id: RawMemoryFloatAccess.java 561 2005-07-11 20:09:17Z mdeters $ // ************************************************************************ // // jRate // // Copyright (C) 2001-2005 by Angelo Corsaro. // // All Rights Reserved. // // Permission to use, copy, modify, and distribute this software and // its documentation for any purpose is hereby granted without fee, // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. I don't make any representations // about the suitability of this software for any purpose. It is // provided "as is" without express or implied warranty. // // // ************************************************************************* // // ************************************************************************* package javax.realtime; /** * This class extends the capabilities of {@link RawMemoryAccess} by * additionally supporting the interpretation of raw memory as float * and double types. * * @author Morgan Deters * @version 1.0 * @since 0.3.8 */ public class RawMemoryFloatAccess extends RawMemoryAccess { /** * Constructs a raw memory accessor associated to a memory area of * the given memory type and size. * * @param type the memory type * @param size the size of the memory area * @throws SecurityException the current execution context does * not have permission to access physical memory, or memory of the * given type * @throws OffsetOutOfBoundsException this exception is never * thrown; it is in the signature to be spec-compliant * @throws SizeOutOfBoundsException the size is negative or too * large * @throws UnsupportedPhysicalMemoryException the hardware does * not support this type of memory * @throws MemoryTypeConflictException the type parameter's * attributes conflict with each other */ public RawMemoryFloatAccess(Object type, long size) throws OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedPhysicalMemoryException, MemoryTypeConflictException { super(type, size); } /** * Constructs a raw memory accessor associated to a memory area of * the given memory type and size, based at the given offset. * * @param type the memory type * @param base the base offset of the memory area * @param size the size of the memory area * @throws SecurityException the current execution context does * not have permission to access physical memory, or memory of the * given type * @throws OffsetOutOfBoundsException this exception is never * thrown; it is in the signature to be spec-compliant * @throws SizeOutOfBoundsException the size is negative or too * large * @throws UnsupportedPhysicalMemoryException the hardware does * not support this type of memory * @throws MemoryTypeConflictException the type parameter's * attributes conflict with each other or with the specified base * offset */ public RawMemoryFloatAccess(Object type, long base, long size) throws OffsetOutOfBoundsException, SizeOutOfBoundsException, UnsupportedPhysicalMemoryException, MemoryTypeConflictException { super(type, base, size); } /** * Get the double at the given offset. * * @param offset the memory offset to access * @return the double at the given offset * @throws OffsetOutOfBoundsException the given offset is negative * or outside the range of this raw memory area * @throws SizeOutOfBoundsException satisfying the request would * require accessing storage beyond the end of the memory area */ public double getDouble(long offset) throws OffsetOutOfBoundsException, SizeOutOfBoundsException { throw new UnimplementedFeatureError(); } /** * Get a consecutive sequence of doubles at the given offset. * * @param offset the memory offset to access * @param doubles the array to copy doubles into * @param low the offset into the array at which to start copying * @param number the number of doubles to copy * @throws OffsetOutOfBoundsException the given offset is negative * or outside the range of this raw memory area * @throws 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) throws OffsetOutOfBoundsException, SizeOutOfBoundsException { throw new UnimplementedFeatureError(); } /** * Get the float at the given offset. * * @param offset the memory offset to access * @return the float at the given offset * @throws OffsetOutOfBoundsException the given offset is negative * or outside the range of this raw memory area * @throws SizeOutOfBoundsException satisfying the request would * require accessing storage beyond the end of the memory area */ public float getFloat(long offset) throws OffsetOutOfBoundsException, SizeOutOfBoundsException { throw new UnimplementedFeatureError(); } /** * Get a consecutive sequence of floats at the given offset. * * @param offset the memory offset to access * @param floats the array to copy floats into * @param low the offset into the array at which to start copying * @param number the number of floats to copy * @throws OffsetOutOfBoundsException the given offset is negative * or outside the range of this raw memory area * @throws 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) throws OffsetOutOfBoundsException, SizeOutOfBoundsException { throw new UnimplementedFeatureError(); } /** * Set the double at the given offset. * * @param offset the memory offset to access * @param value the value to assign the double in memory * @throws OffsetOutOfBoundsException the given offset is negative * or outside the range of this raw memory area * @throws SizeOutOfBoundsException satisfying the request would * require accessing storage beyond the end of the memory area */ public void setDouble(long offset, double value) throws OffsetOutOfBoundsException, SizeOutOfBoundsException { throw new UnimplementedFeatureError(); } /** * Set a consecutive sequence of doubles at the given offset. * * @param offset the memory offset to access * @param doubles the array to copy doubles from * @param low the offset into the array at which to start copying * @param number the number of doubles to copy * @throws OffsetOutOfBoundsException the given offset is negative * or outside the range of this raw memory area * @throws 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) throws OffsetOutOfBoundsException, SizeOutOfBoundsException { throw new UnimplementedFeatureError(); } /** * Set the float at the given offset. * * @param offset the memory offset to access * @param value the value to assign the float in memory * @throws OffsetOutOfBoundsException the given offset is negative * or outside the range of this raw memory area * @throws SizeOutOfBoundsException satisfying the request would * require accessing storage beyond the end of the memory area */ public void setFloat(long offset, float value) throws OffsetOutOfBoundsException, SizeOutOfBoundsException { throw new UnimplementedFeatureError(); } /** * Set a consecutive sequence of floats at the given offset. * * @param offset the memory offset to access * @param floats the array to copy floats from * @param low the offset into the array at which to start copying * @param number the number of floats to copy * @throws OffsetOutOfBoundsException the given offset is negative * or outside the range of this raw memory area * @throws 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) throws OffsetOutOfBoundsException, SizeOutOfBoundsException { throw new UnimplementedFeatureError(); } }