Package org.apache.poi.hssf.record
Class CellRecord
- java.lang.Object
-
- org.apache.poi.hssf.record.RecordBase
-
- org.apache.poi.hssf.record.Record
-
- org.apache.poi.hssf.record.StandardRecord
-
- org.apache.poi.hssf.record.CellRecord
-
- All Implemented Interfaces:
Duplicatable
,GenericRecord
,CellValueRecordInterface
- Direct Known Subclasses:
BoolErrRecord
,FormulaRecord
,LabelSSTRecord
,NumberRecord
,RKRecord
public abstract class CellRecord extends StandardRecord implements CellValueRecordInterface
Base class for all cell value records (implementors ofCellValueRecordInterface
). Subclasses are expected to manage the cell data values (of various types).
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CellRecord()
protected
CellRecord(CellRecord other)
protected
CellRecord(RecordInputStream in)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CellRecord
copy()
short
getColumn()
protected int
getDataSize()
Map<String,Supplier<?>>
getGenericProperties()
protected abstract String
getRecordName()
Gets the debug info BIFF record type name (used byRecord.toString()
.int
getRow()
protected abstract int
getValueDataSize()
short
getXFIndex()
get the index to the ExtendedFormatvoid
serialize(LittleEndianOutput out)
Write the data content of this BIFF record.protected abstract void
serializeValue(LittleEndianOutput out)
writes out the value data for this cell recordvoid
setColumn(short col)
void
setRow(int row)
void
setXFIndex(short xf)
set the index to the ExtendedFormat-
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
-
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, getGenericRecordType, getSid, serialize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
-
-
-
Constructor Detail
-
CellRecord
protected CellRecord()
-
CellRecord
protected CellRecord(CellRecord other)
-
CellRecord
protected CellRecord(RecordInputStream in)
-
-
Method Detail
-
setRow
public final void setRow(int row)
- Specified by:
setRow
in interfaceCellValueRecordInterface
- Parameters:
row
- the row this cell occurs within
-
setColumn
public final void setColumn(short col)
- Specified by:
setColumn
in interfaceCellValueRecordInterface
- Parameters:
col
- the column this cell defines
-
setXFIndex
public final void setXFIndex(short xf)
set the index to the ExtendedFormat- Specified by:
setXFIndex
in interfaceCellValueRecordInterface
- Parameters:
xf
- index to the XF record- See Also:
ExtendedFormatRecord
-
getRow
public final int getRow()
- Specified by:
getRow
in interfaceCellValueRecordInterface
- Returns:
- the row this cell occurs on
-
getColumn
public final short getColumn()
- Specified by:
getColumn
in interfaceCellValueRecordInterface
- Returns:
- the column this cell defines within the row
-
getXFIndex
public final short getXFIndex()
get the index to the ExtendedFormat- Specified by:
getXFIndex
in interfaceCellValueRecordInterface
- Returns:
- index to the XF record
- See Also:
ExtendedFormatRecord
-
getRecordName
protected abstract String getRecordName()
Gets the debug info BIFF record type name (used byRecord.toString()
.- Returns:
- the record type name
-
serializeValue
protected abstract void serializeValue(LittleEndianOutput out)
writes out the value data for this cell record- Parameters:
out
- the output
-
getValueDataSize
protected abstract int getValueDataSize()
- Returns:
- the size (in bytes) of the value data for this cell record
-
serialize
public final void serialize(LittleEndianOutput out)
Description copied from class:StandardRecord
Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.The number of bytes written must equal the record size reported by
RecordBase.getRecordSize()
} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).- Specified by:
serialize
in classStandardRecord
- Parameters:
out
- the output object
-
getDataSize
protected final int getDataSize()
- Specified by:
getDataSize
in classStandardRecord
-
copy
public abstract CellRecord copy()
- Specified by:
copy
in interfaceDuplicatable
- Specified by:
copy
in classStandardRecord
- Returns:
- a deep copy of the implementing class / instance
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericProperties
in interfaceGenericRecord
-
-