Class RecordAggregate
- java.lang.Object
-
- org.apache.poi.hssf.record.RecordBase
-
- org.apache.poi.hssf.record.aggregates.RecordAggregate
-
- Direct Known Subclasses:
BOFRecordAggregate,CFRecordsAggregate,ChartSubstreamRecordAggregate,ColumnInfoRecordsAggregate,ConditionalFormattingTable,CustomViewSettingsRecordAggregate,DataValidityTable,FormulaRecordAggregate,MergedCellsTable,PageSettingsBlock,RowRecordsAggregate,WorksheetProtectionBlock
public abstract class RecordAggregate extends RecordBase
RecordAggregates are groups of of BIFFRecords that are typically stored together and/or updated together. Workbook / Sheet records are typically stored in a sequential list, which does not provide much structure to coordinate updates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRecordAggregate.PositionTrackingVisitorA wrapper forRecordAggregate.RecordVisitorwhich accumulates the sizes of all records visited.static interfaceRecordAggregate.RecordVisitor
-
Constructor Summary
Constructors Constructor Description RecordAggregate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetRecordSize()gives the current serialized size of the record.intserialize(int offset, byte[] data)called by the class that is responsible for writing this sucker.abstract voidvisitContainedRecords(RecordAggregate.RecordVisitor rv)Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file.
-
-
-
Method Detail
-
visitContainedRecords
public abstract void visitContainedRecords(RecordAggregate.RecordVisitor rv)
Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file. Implementors may or may not return the actualRecords being used to manage POI's internal implementation. Callers should not assume either way, and therefore only attempt to modify thoseRecords after cloning- Parameters:
rv- The visitor to use for callbacks while walking this object
-
serialize
public final int serialize(int offset, byte[] data)Description copied from class:RecordBasecalled 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:
serializein classRecordBase- Parameters:
offset- to begin writing atdata- byte array containing instance data- Returns:
- number of bytes written
-
getRecordSize
public int getRecordSize()
Description copied from class:RecordBasegives the current serialized size of the record. Should include the sid and reclength (4 bytes).- Specified by:
getRecordSizein classRecordBase- Returns:
- the record size
-
-