org.apache.poi.hssf.record
Class SharedValueRecordBase

java.lang.Object
  extended by org.apache.poi.hssf.record.RecordBase
      extended by org.apache.poi.hssf.record.Record
          extended by org.apache.poi.hssf.record.SharedValueRecordBase
Direct Known Subclasses:
ArrayRecord, SharedFormulaRecord, TableRecord

public abstract class SharedValueRecordBase
extends Record

Common base class for SharedFormulaRecord, ArrayRecord and TableRecord which are have similarities.

Author:
Josh Micich

Constructor Summary
protected SharedValueRecordBase()
           
protected SharedValueRecordBase(CellRangeAddress8Bit range)
           
  SharedValueRecordBase(RecordInputStream in)
          reads only the range (1 CellRangeAddress8Bit) from the stream
 
Method Summary
protected abstract  int getExtraDataSize()
           
 int getFirstColumn()
           
 int getFirstRow()
           
 int getLastColumn()
           
 int getLastRow()
           
 CellRangeAddress8Bit getRange()
           
 int getRecordSize()
          gives the current serialized size of the record.
 boolean isFirstCell(int rowIx, int colIx)
           
 boolean isInRange(int rowIx, int colIx)
           
 int serialize(int offset, byte[] data)
          called by the class that is responsible for writing this sucker.
protected abstract  void serializeExtraData(int offset, byte[] data)
           
 
Methods inherited from class org.apache.poi.hssf.record.Record
clone, cloneViaReserialise, getSid, serialize, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedValueRecordBase

protected SharedValueRecordBase(CellRangeAddress8Bit range)

SharedValueRecordBase

protected SharedValueRecordBase()

SharedValueRecordBase

public SharedValueRecordBase(RecordInputStream in)
reads only the range (1 CellRangeAddress8Bit) from the stream

Method Detail

getRange

public final CellRangeAddress8Bit getRange()

getFirstRow

public final int getFirstRow()

getLastRow

public final int getLastRow()

getFirstColumn

public final int getFirstColumn()

getLastColumn

public final int getLastColumn()

getRecordSize

public final 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

getExtraDataSize

protected abstract int getExtraDataSize()

serializeExtraData

protected abstract void serializeExtraData(int offset,
                                           byte[] data)

serialize

public final int serialize(int offset,
                           byte[] data)
Description copied from class: RecordBase
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 RecordBase
Parameters:
offset - to begin writing at
data - byte array containing instance data
Returns:
number of bytes written

isInRange

public final boolean isInRange(int rowIx,
                               int colIx)
Returns:
true if (rowIx, colIx) is within the range (getRange()) of this shared value object.

isFirstCell

public final boolean isFirstCell(int rowIx,
                                 int colIx)
Returns:
true if (rowIx, colIx) describes the first cell in this shared value object's range (getRange())


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.