JavaTM 2 Platform
Std. Ed. v1.3.1

com.apple.mrj.jdirect
Class CharArrayStruct

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

public class CharArrayStruct
extends Struct

CharArrayStruct is the base class for Java objects which mimic MacOS structs that in C are allocated as local stack variables - not heap allocated. (e.g. Rect, FSSpec, etc.)

The data for these structs is allocated in the java garbage collected heap in the form of a char[].


Field Summary
protected  char[] chars
           
 
Constructor Summary
protected CharArrayStruct(int sizeInBytes)
           
 
Method Summary
 char[] getArray()
           
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)
           
protected  int getIntAt(int offset)
           
protected  long getLongAt(int offset)
           
protected  short getShortAt(int offset)
           
 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chars

protected char[] chars
Constructor Detail

CharArrayStruct

protected CharArrayStruct(int sizeInBytes)
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

getArray

public final char[] getArray()

getSize

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

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.