Top Description Inners Constructors Methods
org.apache.poi.hssf.record.aggregates

public abstract Class RecordAggregate

extends RecordBase
Class Inheritance
Known Direct Subclasses
org.apache.poi.hssf.record.aggregates.RowRecordsAggregate, org.apache.poi.hssf.record.aggregates.WorksheetProtectionBlock, org.apache.poi.hssf.record.aggregates.CFRecordsAggregate, org.apache.poi.hssf.record.aggregates.ChartSubstreamRecordAggregate, org.apache.poi.hssf.record.aggregates.ColumnInfoRecordsAggregate, org.apache.poi.hssf.record.aggregates.ConditionalFormattingTable, org.apache.poi.hssf.record.aggregates.CustomViewSettingsRecordAggregate, org.apache.poi.hssf.record.aggregates.DataValidityTable, org.apache.poi.hssf.record.aggregates.FormulaRecordAggregate, org.apache.poi.hssf.record.aggregates.MergedCellsTable, org.apache.poi.hssf.record.aggregates.PageSettingsBlock, org.apache.poi.hssf.record.aggregates.PageSettingsBlock.PLSAggregate
Imports
org.apache.poi.hssf.record.Record, .RecordBase

RecordAggregates are groups of of BIFF Records 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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
RecordAggregate.PositionTrackingVisitor

A wrapper for RecordVisitor which accumulates the sizes of all records visited.

private static class
public static interface
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
getRecordSize()

Implements abstract org.apache.poi.hssf.record.RecordBase.getRecordSize.

gives the current serialized size of the record.

public final int
serialize(int
to begin writing at
offset
,
byte[]
byte array containing instance data
data
)

Implements abstract org.apache.poi.hssf.record.RecordBase.serialize.

called by the class that is responsible for writing this sucker.

public abstract void
visitContainedRecords(RecordAggregate.RecordVisitor
The visitor to use for callbacks while walking this object
rv
)

Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file.

Constructor Detail

RecordAggregateback to summary
public RecordAggregate()

Method Detail

getRecordSizeback to summary
public int getRecordSize()

Implements abstract org.apache.poi.hssf.record.RecordBase.getRecordSize.

Doc from org.apache.poi.hssf.record.RecordBase.getRecordSize.

gives the current serialized size of the record. Should include the sid and reclength (4 bytes).

Returns:int

the record size

Annotations
@Override
serializeback to summary
public final int serialize(int offset, byte[] data)

Implements abstract org.apache.poi.hssf.record.RecordBase.serialize.

Doc from org.apache.poi.hssf.record.RecordBase.serialize.

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.

Parameters
offset:int

to begin writing at

data:byte[]

byte array containing instance data

Returns:int

number of bytes written

Annotations
@Override
visitContainedRecordsback to summary
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 actual Records being used to manage POI's internal implementation. Callers should not assume either way, and therefore only attempt to modify those Records after cloning

Parameters
rv:RecordAggregate.RecordVisitor

The visitor to use for callbacks while walking this object

org.apache.poi.hssf.record.aggregates back to summary

public final Class RecordAggregate.PositionTrackingVisitor

extends Object
implements RecordVisitor
Class Inheritance
  • java.lang.Object
  • org.apache.poi.hssf.record.aggregates.RecordAggregate.PositionTrackingVisitor
All Implemented Interfaces
org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor

A wrapper for RecordVisitor which accumulates the sizes of all records visited.

Field Summary

Modifier and TypeField and Description
private int
private final RecordAggregate.RecordVisitor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public void
setPosition(int position)

public void
visitRecord(Record
must not be null
r
)

Implements org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Implementors may call non-mutating methods on Record r.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_positionback to summary
private int _position
_rvback to summary
private final RecordAggregate.RecordVisitor _rv

Constructor Detail

PositionTrackingVisitorback to summary
public PositionTrackingVisitor(RecordAggregate.RecordVisitor rv, int initialPosition)

Method Detail

getPositionback to summary
public int getPosition()
setPositionback to summary
public void setPosition(int position)
visitRecordback to summary
public void visitRecord(Record r)

Implements org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Doc from org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Implementors may call non-mutating methods on Record r.

Parameters
r:Record

must not be null

Annotations
@Override
org.apache.poi.hssf.record.aggregates back to summary

private final Class RecordAggregate.RecordSizingVisitor

extends Object
implements RecordVisitor
Class Inheritance
  • java.lang.Object
  • org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordSizingVisitor
All Implemented Interfaces
org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor

Field Summary

Modifier and TypeField and Description
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public void
visitRecord(Record
must not be null
r
)

Implements org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Implementors may call non-mutating methods on Record r.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_totalSizeback to summary
private int _totalSize

Constructor Detail

RecordSizingVisitorback to summary
public RecordSizingVisitor()

Method Detail

getTotalSizeback to summary
public int getTotalSize()
visitRecordback to summary
public void visitRecord(Record r)

Implements org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Doc from org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Implementors may call non-mutating methods on Record r.

Parameters
r:Record

must not be null

Annotations
@Override
org.apache.poi.hssf.record.aggregates back to summary

public Interface RecordAggregate.RecordVisitor

Known Direct Implementers
org.apache.poi.hssf.record.aggregates.RecordAggregate.SerializingRecordVisitor, org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordSizingVisitor, org.apache.poi.hssf.record.aggregates.RecordAggregate.PositionTrackingVisitor, org.apache.poi.hssf.usermodel.HSSFWorkbook.SheetRecordCollector, org.apache.poi.hssf.model.InternalSheet.RecordCloner

Method Summary

Modifier and TypeMethod and Description
public void
visitRecord(Record
must not be null
r
)

Implementors may call non-mutating methods on Record r.

Method Detail

visitRecordback to summary
public void visitRecord(Record r)

Implementors may call non-mutating methods on Record r.

Parameters
r:Record

must not be null

org.apache.poi.hssf.record.aggregates back to summary

private final Class RecordAggregate.SerializingRecordVisitor

extends Object
implements RecordVisitor
Class Inheritance
  • java.lang.Object
  • org.apache.poi.hssf.record.aggregates.RecordAggregate.SerializingRecordVisitor
All Implemented Interfaces
org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor

Field Summary

Modifier and TypeField and Description
private int
private final byte[]
private final int

Constructor Summary

AccessConstructor and Description
public
SerializingRecordVisitor(byte[] data, int startOffset)

Method Summary

Modifier and TypeMethod and Description
public int
public void
visitRecord(Record
must not be null
r
)

Implements org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Implementors may call non-mutating methods on Record r.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_countBytesWrittenback to summary
private int _countBytesWritten
_databack to summary
private final byte[] _data
_startOffsetback to summary
private final int _startOffset

Constructor Detail

SerializingRecordVisitorback to summary
public SerializingRecordVisitor(byte[] data, int startOffset)

Method Detail

countBytesWrittenback to summary
public int countBytesWritten()
visitRecordback to summary
public void visitRecord(Record r)

Implements org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Doc from org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor.visitRecord.

Implementors may call non-mutating methods on Record r.

Parameters
r:Record

must not be null

Annotations
@Override