jxl.write.biff
Class SupbookRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.biff.WritableRecordData
              |
              +--jxl.write.biff.SupbookRecord
All Implemented Interfaces:
ByteData

class SupbookRecord
extends WritableRecordData

Stores the supporting workbook information. For files written by JExcelApi this will only reference internal sheets


Inner Class Summary
private static class SupbookRecord.SupbookType
          The type of supbook this refers to
 
Field Summary
static SupbookRecord.SupbookType ADDIN
           
private  byte[] data
          The data to be written to the binary file
static SupbookRecord.SupbookType EXTERNAL
           
private  java.lang.String fileName
          The name of the external file
static SupbookRecord.SupbookType INTERNAL
           
static SupbookRecord.SupbookType LINK
           
private  int numSheets
          The number of sheets - internal & external supbooks only
private  java.lang.String[] sheetNames
          The names of the external sheets
private  SupbookRecord.SupbookType type
          The type of this supbook record
static SupbookRecord.SupbookType UNKNOWN
           
 
Fields inherited from class jxl.biff.WritableRecordData
maxRecordLength
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
SupbookRecord(int sheets)
          Constructor for internal sheets
SupbookRecord(SupbookRecord sr)
          Constructor used when copying from an external workbook
 
Method Summary
 byte[] getData()
          The binary data to be written out
 int getNumberOfSheets()
          Gets the number of sheets.
 SupbookRecord.SupbookType getType()
          Gets the type of this supbook record
private  void initExternal(SupbookRecord sr)
          Initializes an external supbook record
private  void initInternal(SupbookRecord sr)
          Initializes an internal supbook record
 
Methods inherited from class jxl.biff.WritableRecordData
getBytes, handleContinueRecords
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

type

private SupbookRecord.SupbookType type
The type of this supbook record

data

private byte[] data
The data to be written to the binary file

numSheets

private int numSheets
The number of sheets - internal & external supbooks only

fileName

private java.lang.String fileName
The name of the external file

sheetNames

private java.lang.String[] sheetNames
The names of the external sheets

INTERNAL

public static final SupbookRecord.SupbookType INTERNAL

EXTERNAL

public static final SupbookRecord.SupbookType EXTERNAL

ADDIN

public static final SupbookRecord.SupbookType ADDIN

LINK

public static final SupbookRecord.SupbookType LINK

UNKNOWN

public static final SupbookRecord.SupbookType UNKNOWN
Constructor Detail

SupbookRecord

public SupbookRecord(int sheets)
Constructor for internal sheets

SupbookRecord

public SupbookRecord(SupbookRecord sr)
Constructor used when copying from an external workbook
Method Detail

initInternal

private void initInternal(SupbookRecord sr)
Initializes an internal supbook record
Parameters:
sr - the read supbook record to copy from

initExternal

private void initExternal(SupbookRecord sr)
Initializes an external supbook record
Parameters:
sr - the read supbook record to copy from

getData

public byte[] getData()
The binary data to be written out
Overrides:
getData in class WritableRecordData
Returns:
the binary data

getType

public SupbookRecord.SupbookType getType()
Gets the type of this supbook record
Returns:
the type of this supbook

getNumberOfSheets

public int getNumberOfSheets()
Gets the number of sheets. This will only be non-zero for internal and external supbooks
Returns:
the number of sheets