org.apache.poi.hssf.record
Class ExternSheetRecord

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.ExternSheetRecord

public class ExternSheetRecord
extends Record

EXTERNSHEET (0x0017)
A List of Indexes to EXTERNALBOOK (supplemental book) Records

Author:
Libin Roman (Vista Portal LDT. Developer)

Field Summary
static short sid
           
 
Constructor Summary
ExternSheetRecord()
           
ExternSheetRecord(RecordInputStream in)
          called by the constructor, should set class level fields.
 
Method Summary
 int addRef(int extBookIndex, int firstSheetIndex, int lastSheetIndex)
           
 void addREFRecord(org.apache.poi.hssf.record.ExternSheetRecord.RefSubRecord rec)
          adds REF struct (ExternSheetSubRecord)
static ExternSheetRecord combine(ExternSheetRecord[] esrs)
           
 int findRefIndexFromExtBookIndex(int extBookIndex)
           
 int getExtbookIndexFromRefIndex(int refIndex)
           
 int getFirstSheetIndexFromRefIndex(int extRefIndex)
           
 int getNumOfREFRecords()
          returns the number of REF Records, which is in model
 int getNumOfRefs()
           
 int getRecordSize()
          gives the current serialized size of the record.
 int getRefIxForSheet(int externalBookIndex, int sheetIndex)
           
 short getSid()
          return the non static version of the id for this record.
 int serialize(int offset, byte[] data)
          called by the class that is responsible for writing this sucker.
 java.lang.String toString()
          get a string representation of the record (for biffview/debugging)
 
Methods inherited from class org.apache.poi.hssf.record.Record
clone, cloneViaReserialise, serialize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sid

public static final short sid
See Also:
Constant Field Values
Constructor Detail

ExternSheetRecord

public ExternSheetRecord()

ExternSheetRecord

public ExternSheetRecord(RecordInputStream in)
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
Method Detail

getNumOfRefs

public int getNumOfRefs()
Returns:
number of REF structures

addREFRecord

public void addREFRecord(org.apache.poi.hssf.record.ExternSheetRecord.RefSubRecord rec)
adds REF struct (ExternSheetSubRecord)

Parameters:
rec - REF struct

getNumOfREFRecords

public int getNumOfREFRecords()
returns the number of REF Records, which is in model

Returns:
number of REF records

toString

public java.lang.String toString()
Description copied from class: Record
get a string representation of the record (for biffview/debugging)

Overrides:
toString in class Record

serialize

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

Specified by:
serialize in class RecordBase
Parameters:
offset - to begin writing at
data - byte array containing instance data
Returns:
number of bytes written

getRecordSize

public 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

getSid

public short getSid()
return the non static version of the id for this record.

Specified by:
getSid in class Record

getExtbookIndexFromRefIndex

public int getExtbookIndexFromRefIndex(int refIndex)

findRefIndexFromExtBookIndex

public int findRefIndexFromExtBookIndex(int extBookIndex)
Returns:
-1 if not found

getFirstSheetIndexFromRefIndex

public int getFirstSheetIndexFromRefIndex(int extRefIndex)

addRef

public int addRef(int extBookIndex,
                  int firstSheetIndex,
                  int lastSheetIndex)
Returns:
index of newly added ref

getRefIxForSheet

public int getRefIxForSheet(int externalBookIndex,
                            int sheetIndex)

combine

public static ExternSheetRecord combine(ExternSheetRecord[] esrs)


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