Package loci.poi.hssf.record
Class Record
java.lang.Object
loci.poi.hssf.record.Record
- Direct Known Subclasses:
AbstractEscherHolderRecord,AreaFormatRecord,AreaRecord,AxisLineFormatRecord,AxisOptionsRecord,AxisParentRecord,AxisRecord,AxisUsedRecord,BackupRecord,BarRecord,BeginRecord,BlankRecord,BOFRecord,BookBoolRecord,BoolErrRecord,BottomMarginRecord,BoundSheetRecord,CalcCountRecord,CalcModeRecord,CategorySeriesAxisRecord,ChartFormatRecord,ChartRecord,CodepageRecord,ColumnInfoRecord,ColumnInfoRecordsAggregate,ContinueRecord,CountryRecord,DataFormatRecord,DateWindow1904Record,DatRecord,DBCellRecord,DefaultColWidthRecord,DefaultDataLabelTextPropertiesRecord,DefaultRowHeightRecord,DeltaRecord,DimensionsRecord,DrawingRecord,DSFRecord,EndRecord,EOFRecord,ExtendedFormatRecord,ExternSheetRecord,ExternSheetSubRecord,ExtSSTInfoSubRecord,ExtSSTRecord,FilePassRecord,FileSharingRecord,FnGroupCountRecord,FontBasisRecord,FontIndexRecord,FontRecord,FooterRecord,FormatRecord,FormulaRecord,FormulaRecordAggregate,FrameRecord,GridsetRecord,GutsRecord,HCenterRecord,HeaderRecord,HideObjRecord,IndexRecord,InterfaceEndRecord,InterfaceHdrRecord,IterationRecord,LabelRecord,LabelSSTRecord,LeftMarginRecord,LegendRecord,LineFormatRecord,LinkedDataRecord,MergeCellsRecord,MMSRecord,MulBlankRecord,MulRKRecord,NameRecord,NoteRecord,NumberFormatIndexRecord,NumberRecord,ObjectLinkRecord,ObjectProtectRecord,ObjRecord,PageBreakRecord,PaletteRecord,PaneRecord,PasswordRecord,PasswordRev4Record,PlotAreaRecord,PlotGrowthRecord,PrecisionRecord,PrintGridlinesRecord,PrintHeadersRecord,PrintSetupRecord,ProtectionRev4Record,ProtectRecord,RecalcIdRecord,RefModeRecord,RefreshAllRecord,RightMarginRecord,RKRecord,RowRecord,RowRecordsAggregate,SaveRecalcRecord,ScenarioProtectRecord,SCLRecord,SelectionRecord,SeriesChartGroupIndexRecord,SeriesIndexRecord,SeriesLabelsRecord,SeriesListRecord,SeriesRecord,SeriesTextRecord,SeriesToChartGroupRecord,SharedFormulaRecord,SheetPropertiesRecord,SSTRecord,StringRecord,StyleRecord,SubRecord,SupBookRecord,TabIdRecord,TextObjectBaseRecord,TextRecord,TickRecord,TopMarginRecord,UnitsRecord,UnknownRecord,UseSelFSRecord,ValueRangeRecord,ValueRecordsAggregate,VCenterRecord,WindowOneRecord,WindowProtectRecord,WindowTwoRecord,WriteAccessRecord,WriteProtectRecord,WSBoolRecord
Title: Record
Description: All HSSF Records inherit from this class. It
populates the fields common to all records (id, size and data).
Subclasses should be sure to validate the id,
Company:
- Version:
- 2.0-pre
- Author:
- Andrew C. Oliver, Marc Johnson (mjohnson at apache dot org), Jason Height (jheight at chariot dot net dot au)
-
Constructor Summary
ConstructorsConstructorDescriptionRecord()instantiates a blank record strictly for ID matchingConstructor Record -
Method Summary
Modifier and TypeMethodDescriptionclone()protected abstract voidcalled by the constructor, should set class level fields.intgives the current serialized size of the record.abstract shortgetSid()return the non static version of the id for this record.booleanDBCELL, ROW, VALUES all say yesbooleanisValue()tells whether this type of record contains a valuebyte[]called by the class that is responsible for writing this sucker.abstract intserialize(int offset, byte[] data) called by the class that is responsible for writing this sucker.toString()get a string representation of the record (for biffview/debugging)protected abstract voidvalidateSid(short id) called by constructor, should throw runtime exception in the event of a record passed with a differing ID.
-
Constructor Details
-
Record
public Record()instantiates a blank record strictly for ID matching -
Record
Constructor Record- Parameters:
in- the RecordInputstream to read the record from
-
-
Method Details
-
validateSid
protected abstract void validateSid(short id) called by constructor, should throw runtime exception in the event of a record passed with a differing ID.- Parameters:
id- alleged id for this record
-
fillFields
called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.- Parameters:
in- the RecordInputstream to read the record from
-
serialize
public byte[] 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.- Returns:
- byte array containing instance data
-
serialize
public abstract 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.- Parameters:
offset- to begin writing atdata- byte array containing instance data- Returns:
- number of bytes written
-
getRecordSize
public int getRecordSize()gives the current serialized size of the record. Should include the sid and reclength (4 bytes). -
isValue
public boolean isValue()tells whether this type of record contains a value -
isInValueSection
public boolean isInValueSection()DBCELL, ROW, VALUES all say yes -
toString
get a string representation of the record (for biffview/debugging) -
getSid
public abstract short getSid()return the non static version of the id for this record. -
clone
-