org.apache.poi.hssf.record.aggregates
Class ValueRecordsAggregate

java.lang.Object
  extended byorg.apache.poi.hssf.record.Record
      extended byorg.apache.poi.hssf.record.aggregates.ValueRecordsAggregate

public class ValueRecordsAggregate
extends Record

Aggregate value records together. Things are easier to handle that way.

Author:
andy, Glen Stampoultzis (glens at apache.org), Jason Height (jheight at chariot dot net dot au)

Field Summary
static short sid
           
 
Constructor Summary
ValueRecordsAggregate()
          Creates a new instance of ValueRecordsAggregate
 
Method Summary
 java.lang.Object clone()
          Performs a deep clone of the record
 int construct(int offset, java.util.List records)
           
protected  void fillFields(byte[] data, short size, int offset)
          called by the constructor, should set class level fields.
 int getFirstCellNum()
           
 java.util.Iterator getIterator()
           
 int getLastCellNum()
           
 int getPhysicalNumberOfCells()
           
 int getRecordSize()
          gives the current serialized size of the record.
 short getSid()
          return the non static version of the id for this record.
 void insertCell(CellValueRecordInterface cell)
           
 void removeCell(CellValueRecordInterface cell)
           
 int serialize(int offset, byte[] data)
          called by the class that is responsible for writing this sucker.
protected  void validateSid(short id)
          called by constructor, should throw runtime exception in the event of a record passed with a differing ID.
 
Methods inherited from class org.apache.poi.hssf.record.Record
fillFields, isInValueSection, isValue, processContinueRecord, serialize, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sid

public static final short sid
See Also:
Constant Field Values
Constructor Detail

ValueRecordsAggregate

public ValueRecordsAggregate()
Creates a new instance of ValueRecordsAggregate

Method Detail

insertCell

public void insertCell(CellValueRecordInterface cell)

removeCell

public void removeCell(CellValueRecordInterface cell)

getPhysicalNumberOfCells

public int getPhysicalNumberOfCells()

getFirstCellNum

public int getFirstCellNum()

getLastCellNum

public int getLastCellNum()

construct

public int construct(int offset,
                     java.util.List records)

serialize

public int serialize(int offset,
                     byte[] data)
called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.

Specified by:
serialize in class Record
Parameters:
offset - to begin writing at
data - byte array containing instance data
Returns:
number of bytes written

fillFields

protected void fillFields(byte[] data,
                          short size,
                          int offset)
called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.

Specified by:
fillFields in class Record
Parameters:
data - raw data
size - size of data
offset - of the record's data (provided a big array of the file)

validateSid

protected void validateSid(short id)
called by constructor, should throw runtime exception in the event of a record passed with a differing ID.

Specified by:
validateSid in class Record
Parameters:
id - alleged id for this record

getSid

public short getSid()
return the non static version of the id for this record.

Specified by:
getSid in class Record

getRecordSize

public int getRecordSize()
Description copied from class: Record
gives the current serialized size of the record. Should include the sid and reclength (4 bytes).

Overrides:
getRecordSize in class Record

getIterator

public java.util.Iterator getIterator()

clone

public java.lang.Object clone()
Performs a deep clone of the record

Overrides:
clone in class Record


Copyright © 2003 Apache Software Foundation.