JavaTM 2 Platform
Std. Ed. v1.3.1

com.apple.mrj.jdirect
Class HandleStruct

java.lang.Object
  |
  +--com.apple.mrj.jdirect.Struct
        |
        +--com.apple.mrj.jdirect.HandleStruct

public abstract class HandleStruct
extends Struct

HandleStruct is the base class for Struct classes which store their C structs as MacOS relocatable heap blocks (e.g. PixMapHandle).


Field Summary
protected  int handle
          The data for these Structs is stored in the MacOS heap.
 
Constructor Summary
protected HandleStruct(int handle)
          Construct a HandleStruct which wraps a C relocatable struct
 
Method Summary
 boolean equals(Object anObject)
          Returns true if both java objects reference the same MacOS heap handle
protected  boolean getBooleanAt(int offset)
           
protected  byte getByteAt(int offset)
           
 byte[] getBytes()
           
 byte[] getBytesAt(int byteOffset, int byteCount)
           
protected  char getCharAt(int offset)
           
protected  double getDoubleAt(int offset)
           
protected  float getFloatAt(int offset)
           
 int getHandle()
          Returns the handle held by the HandleStruct.
protected  int getIntAt(int offset)
           
protected  long getLongAt(int offset)
           
protected  short getShortAt(int offset)
           
abstract  int getSize()
           
protected  void setBooleanAt(int offset, boolean value)
           
protected  void setByteAt(int offset, byte value)
           
protected  void setBytesAt(int byteOffset, byte[] source)
           
protected  void setCharAt(int offset, char value)
           
protected  void setDoubleAt(int offset, double value)
           
protected  void setFloatAt(int offset, float value)
           
protected  void setIntAt(int offset, int value)
           
protected  void setLongAt(int offset, long value)
           
protected  void setShortAt(int offset, short value)
           
protected  void setStructAt(int byteOffset, Struct src)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handle

protected int handle
The data for these Structs is stored in the MacOS heap. This int holds the MacOS Handle to the C struct.
Constructor Detail

HandleStruct

protected HandleStruct(int handle)
Construct a HandleStruct which wraps a C relocatable struct
Parameters:
handle - the MacOS memory Handle
Method Detail

getBooleanAt

protected final boolean getBooleanAt(int offset)
Overrides:
getBooleanAt in class Struct

getByteAt

protected final byte getByteAt(int offset)
Overrides:
getByteAt in class Struct

getCharAt

protected final char getCharAt(int offset)
Overrides:
getCharAt in class Struct

getShortAt

protected final short getShortAt(int offset)
Overrides:
getShortAt in class Struct

getIntAt

protected final int getIntAt(int offset)
Overrides:
getIntAt in class Struct

getLongAt

protected final long getLongAt(int offset)
Overrides:
getLongAt in class Struct

getFloatAt

protected final float getFloatAt(int offset)
Overrides:
getFloatAt in class Struct

getDoubleAt

protected final double getDoubleAt(int offset)
Overrides:
getDoubleAt in class Struct

setBooleanAt

protected final void setBooleanAt(int offset,
                                  boolean value)
Overrides:
setBooleanAt in class Struct

setByteAt

protected final void setByteAt(int offset,
                               byte value)
Overrides:
setByteAt in class Struct

setCharAt

protected final void setCharAt(int offset,
                               char value)
Overrides:
setCharAt in class Struct

setShortAt

protected final void setShortAt(int offset,
                                short value)
Overrides:
setShortAt in class Struct

setIntAt

protected final void setIntAt(int offset,
                              int value)
Overrides:
setIntAt in class Struct

setLongAt

protected final void setLongAt(int offset,
                               long value)
Overrides:
setLongAt in class Struct

setFloatAt

protected final void setFloatAt(int offset,
                                float value)
Overrides:
setFloatAt in class Struct

setDoubleAt

protected final void setDoubleAt(int offset,
                                 double value)
Overrides:
setDoubleAt in class Struct

setBytesAt

protected void setBytesAt(int byteOffset,
                          byte[] source)
Overrides:
setBytesAt in class Struct

setStructAt

protected void setStructAt(int byteOffset,
                           Struct src)
Overrides:
setStructAt in class Struct

getBytesAt

public byte[] getBytesAt(int byteOffset,
                         int byteCount)
Overrides:
getBytesAt in class Struct

getBytes

public byte[] getBytes()
Overrides:
getBytes in class Struct

getSize

public abstract int getSize()
Overrides:
getSize in class Struct

getHandle

public final int getHandle()
Returns the handle held by the HandleStruct.
Returns:
a raw MacOS Handle

equals

public boolean equals(Object anObject)
Returns true if both java objects reference the same MacOS heap handle
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

JavaTM 2 Platform
Std. Ed. v1.3.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.