Class ClassTable
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ClassTable

public class netscape.util.ClassTable
    extends java.lang.Object
{
    /* Constructors
     */
    public ClassTable(Archive);
    public ClassTable(Archive, ClassInfo);

    /* Methods
     */
    public Archive archive();
    public boolean[] booleanArrayAt(int, int);
    public boolean booleanAt(int, int);
    public byte[] byteArrayAt(int, int);
    public byte byteAt(int, int);
    public char[] charArrayAt(int, int);
    public char charAt(int, int);
    public String className();
    public String[] classNames();
    public int columnForField(String);
    public double[] doubleArrayAt(int, int);
    public double doubleAt(int, int);
    public float[] floatArrayAt(int, int);
    public float floatAt(int, int);
    public int[] identifierArrayAt(int, int);
    public int identifierAt(int, int);
    public int[] intArrayAt(int, int);
    public int intAt(int, int);
    public long[] longArrayAt(int, int);
    public long longAt(int, int);
    public int newIdentifier();
    public void readData(InputStream);
    public void readInfo(InputStream);
    public int rowCount();
    public int rowForIdentifier(int);
    public void setBooleanArrayAt(int, int, boolean[]);
    public void setBooleanAt(int, int, boolean);
    public void setByteArrayAt(int, int, byte[]);
    public void setByteAt(int, int, byte);
    public void setCharArrayAt(int, int, char[]);
    public void setCharAt(int, int, char);
    public void setDoubleArrayAt(int, int, double[]);
    public void setDoubleAt(int, int, double);
    public void setFloatArrayAt(int, int, float[]);
    public void setFloatAt(int, int, float);
    public void setIdentifierArrayAt(int, int, int[]);
    public void setIdentifierAt(int, int, int);
    public void setIntArrayAt(int, int, int[]);
    public void setIntAt(int, int, int);
    public void setLongArrayAt(int, int, long[]);
    public void setLongAt(int, int, long);
    public void setShortArrayAt(int, int, short[]);
    public void setShortAt(int, int, short);
    public void setStringArrayAt(int, int, String[]);
    public void setStringAt(int, int, String);
    public short[] shortArrayAt(int, int);
    public short shortAt(int, int);
    public String[] stringArrayAt(int, int);
    public String stringAt(int, int);
    public int versionForClassName(String);
    public void writeData(OutputStream);
    public void writeInfo(OutputStream);
}
Object subclass used by an Archive to store the raw data for its encoded objects. Each class in an Archive has a ClassTable that holds the data for instances of that class. The data in a ClassTable is accessed by row and column index, with a row corresponding to an instance of the class and a column corresponding to a field of that class. Field names can be mapped to column indexes through ClassTable.columnForField(); object identifiers can be mapped to row indexes through ClassTable.rowForIdentifier(). New rows are created through ClassTable.newIdentifier(). Only programs that directly manipulate archive data must deal with ClassTables.
See Also:
Archive, ClassInfo

Constructors

ClassTable

  public ClassTable(Archive archive)
Constructs a new ClassTable for a given Archive. The ClassTable must be added to the archive by calling Archive.addClassTable() once the ClassTable's class name has been set. This constructor is only useful when reading a ClassTable from a stream.
See Also:
readInfo, readData, addClassTable

ClassTable

  public ClassTable(Archive archive,
                    ClassInfo classInfo)
Constructs a new ClassTable for the Archive archive. The ClassTable must be added to the Archive by calling Archive.addClassTable(). classInfo helps configure the ClassTable.
See Also:
addClassTable

Methods

archive

  public Archive archive()
Returns the archive to which this ClassTable belongs.

className

  public String className()
Returns the name of the class this ClassTable represents.

classNames

  public String[] classNames()
Returns the chain of superclasses recorded in this ClassTable.

versionForClassName

  public int versionForClassName(String className)
Returns the version for a given class name.

rowCount

  public int rowCount()
Returns the number of rows in the ClassTable.

newIdentifier

  public int newIdentifier()
Creates a new row in the ClassTable and a new identifier for the archive, returning the new identifier. The new row can be discovered by calling rowForIdentifier().

rowForIdentifier

  public int rowForIdentifier(int id)
Returns the row index for a given object identifier.

columnForField

  public int columnForField(String key)
Returns the column index for the given field name.

booleanAt

  public boolean booleanAt(int row,
                           int column)
Returns the boolean value located at row, column.
See Also:
setBooleanAt

setBooleanAt

  public void setBooleanAt(int row,
                           int column,
                           boolean value)
Sets the boolean value at row, column.

booleanArrayAt

  public boolean[] booleanArrayAt(int row,
                                  int column)
Returns the boolean array located at row, column.
See Also:
setBooleanArrayAt

setBooleanArrayAt

  public void setBooleanArrayAt(int row,
                                int column,
                                boolean value[])
Sets the boolean array at row, column.

charAt

  public char charAt(int row,
                     int column)
Returns the character value located at row, column.
See Also:
setCharAt

setCharAt

  public void setCharAt(int row,
                        int column,
                        char value)
Sets the character value at row, column.

charArrayAt

  public char[] charArrayAt(int row,
                            int column)
Returns the character array located at row, column.
See Also:
setCharArrayAt

setCharArrayAt

  public void setCharArrayAt(int row,
                             int column,
                             char value[])
Sets the character array at row, column.

byteAt

  public byte byteAt(int row,
                     int column)
Returns the byte value located at row, column.
See Also:
@setByteAt

setByteAt

  public void setByteAt(int row,
                        int column,
                        byte value)
Sets the byte value at row, column.

byteArrayAt

  public byte[] byteArrayAt(int row,
                            int column)
Returns the byte array located at row, column.
See Also:
setByteArrayAt

setByteArrayAt

  public void setByteArrayAt(int row,
                             int column,
                             byte value[])
Sets the byte array located at row, column.

shortAt

  public short shortAt(int row,
                       int column)
Returns the short value located at row, column.
See Also:
setShortAt

setShortAt

  public void setShortAt(int row,
                         int column,
                         short value)
Sets the short value at row, column.

shortArrayAt

  public short[] shortArrayAt(int row,
                              int column)
Returns the short array located at row, column.
See Also:
setShortArrayAt

setShortArrayAt

  public void setShortArrayAt(int row,
                              int column,
                              short value[])
Sets the short array at row, column.

intAt

  public int intAt(int row,
                   int column)
Returns the integer value located at row, column.
See Also:
setIntegerAt

setIntAt

  public void setIntAt(int row,
                       int column,
                       int value)
Sets the integer value located at row, column.

intArrayAt

  public int[] intArrayAt(int row,
                          int column)
Returns the integer array located at row, column.
See Also:
setIntegerArrayAt

setIntArrayAt

  public void setIntArrayAt(int row,
                            int column,
                            int value[])
Sets the integer array located at row, column.

longAt

  public long longAt(int row,
                     int column)
Returns the long value located at row, column.
See Also:
setLongAt

setLongAt

  public void setLongAt(int row,
                        int column,
                        long value)
Sets the long value at row, column.

longArrayAt

  public long[] longArrayAt(int row,
                            int column)
Returns the long array located at row, column.
See Also:
setLongArrayAt

setLongArrayAt

  public void setLongArrayAt(int row,
                             int column,
                             long value[])
Sets the long array at row, column.

floatAt

  public float floatAt(int row,
                       int column)
Returns the float value located at row, column.
See Also:
setFloatAt

setFloatAt

  public void setFloatAt(int row,
                         int column,
                         float value)
Sets the float value at row, column.

floatArrayAt

  public float[] floatArrayAt(int row,
                              int column)
Returns the float array located at row, column.
See Also:
setFloatArrayAt

setFloatArrayAt

  public void setFloatArrayAt(int row,
                              int column,
                              float value[])
Sets the float array at row, column.

doubleAt

  public double doubleAt(int row,
                         int column)
Returns the double value located at row, column.
See Also:
setDoubleAt

setDoubleAt

  public void setDoubleAt(int row,
                          int column,
                          double value)
Sets the double value at row, column.

doubleArrayAt

  public double[] doubleArrayAt(int row,
                                int column)
Returns the double array located at row, column.
See Also:
setDoubleArrayAt

setDoubleArrayAt

  public void setDoubleArrayAt(int row,
                               int column,
                               double value[])
Sets the double array at row, column.

stringAt

  public String stringAt(int row,
                         int column)
Returns the string value located at row, column.
See Also:
setStringAt

setStringAt

  public void setStringAt(int row,
                          int column,
                          String value)
Sets the string value at row, column.

stringArrayAt

  public String[] stringArrayAt(int row,
                                int column)
Returns the string array located at row, column.
See Also:
setStringArrayAt

setStringArrayAt

  public void setStringArrayAt(int row,
                               int column,
                               String value[])
Sets the string array at row, column.

identifierAt

  public int identifierAt(int row,
                          int column)
Returns the identifier at row, column.
See Also:
setIdentifierAt

setIdentifierAt

  public void setIdentifierAt(int row,
                              int column,
                              int value)
Sets the identifier at row, column.

identifierArrayAt

  public int[] identifierArrayAt(int row,
                                 int column)
Returns the identifier array at row, column.
See Also:
setIdentifierArrayAt

setIdentifierArrayAt

  public void setIdentifierArrayAt(int row,
                                   int column,
                                   int value[])
Sets the identifier array at row, column.

writeInfo

  public void writeInfo(OutputStream outputStream) throws IOException
Writes the ClassTable's class information to outputStream.

writeData

  public void writeData(OutputStream outputStream) throws IOException
Writes the ClassTable's instance data to outputStream.

readInfo

  public void readInfo(InputStream inputStream) throws IOException
Reads class information from inputStream.

readData

  public void readData(InputStream inputStream) throws IOException
Reads instance data from input.

All Packages  Class Hierarchy  This Package  Previous  Next  Index