com.sun.cldc.jna
Class Pointer

java.lang.Object
  extended by com.sun.squawk.realtime.RawMemoryFloatAccess
      extended by com.sun.cldc.jna.Pointer

public class Pointer
extends RawMemoryFloatAccess

Replacement for Pointer class, which probably shouldn't be used in the simulator.

Author:
wolf
Todo:
implement or determine if should be allowed at all

Constructor Summary
Pointer(int size)
           
Pointer(long base, int size)
           
 
Method Summary
 Address address()
           
static void copyBytes(Pointer src, int srcOffset, Pointer dst, int dstOffset, int len)
           
static Pointer createStringBuffer(java.lang.String value)
           
 void free()
           
 byte getByte(long offset)
           
 void getBytes(long offset, byte[] bytes, int low, int number)
           
 int getInt(long offset)
           
 short getShort(long offset)
           
 void getShorts(long offset, short[] shorts, int low, int number)
           
 int getSize()
           
static Pointer NULL()
           
 void setByte(long offset, byte value)
           
 void setBytes(long offset, byte[] bytes, int low, int number)
           
 void setInt(long offset, int value)
           
 void setShort(long offset, short value)
           
 void setShorts(long offset, short[] shorts, int low, int number)
           
 void setString(int offset, java.lang.String value)
           
 
Methods inherited from class com.sun.squawk.realtime.RawMemoryFloatAccess
getDouble, getFloat, getFloats, setDouble, setFloat, setFloats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pointer

public Pointer(int size)

Pointer

public Pointer(long base,
               int size)
Method Detail

NULL

public static Pointer NULL()

address

public final Address address()

getSize

public final int getSize()

free

public final void free()
                throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

copyBytes

public static void copyBytes(Pointer src,
                             int srcOffset,
                             Pointer dst,
                             int dstOffset,
                             int len)
                      throws OffsetOutOfBoundsException,
                             SizeOutOfBoundsException
Throws:
OffsetOutOfBoundsException
SizeOutOfBoundsException

createStringBuffer

public static Pointer createStringBuffer(java.lang.String value)
                                  throws java.lang.OutOfMemoryError
Throws:
java.lang.OutOfMemoryError

setString

public final void setString(int offset,
                            java.lang.String value)

getByte

public byte getByte(long offset)

getBytes

public void getBytes(long offset,
                     byte[] bytes,
                     int low,
                     int number)

setByte

public void setByte(long offset,
                    byte value)

setBytes

public void setBytes(long offset,
                     byte[] bytes,
                     int low,
                     int number)

getInt

public int getInt(long offset)

setInt

public void setInt(long offset,
                   int value)

getShort

public short getShort(long offset)

getShorts

public void getShorts(long offset,
                      short[] shorts,
                      int low,
                      int number)

setShort

public void setShort(long offset,
                     short value)

setShorts

public void setShorts(long offset,
                      short[] shorts,
                      int low,
                      int number)