jxl.read.biff
Class SupbookRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.read.biff.SupbookRecord

public class SupbookRecord
extends RecordData

A record containing the references to the various sheets (internal and external) referenced by formulas in this workbook


Inner Class Summary
private static class SupbookRecord.Type
          The type of supbook this refers to
 
Field Summary
static SupbookRecord.Type ADDIN
           
static SupbookRecord.Type EXTERNAL
           
private  java.lang.String fileName
          The name of the external file
static SupbookRecord.Type INTERNAL
           
static SupbookRecord.Type 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.Type type
          The type of this supbook record
static SupbookRecord.Type UNKNOWN
           
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
(package private) SupbookRecord(Record t, WorkbookSettings ws)
          Constructs this object from the raw data
 
Method Summary
 byte[] getData()
          Gets the data - used when copying a spreadsheet
private  java.lang.String getEncodedFilename(byte[] data, int ln, int pos)
          Gets the encoded string from the data array
 java.lang.String getFileName()
          Gets the name of the external file
 int getNumberOfSheets()
          Gets the number of sheets.
 java.lang.String getSheetName(int i)
          Gets the name of the external sheet
 SupbookRecord.Type getType()
          Gets the type of this supbook record
private  java.lang.String getUnicodeEncodedFilename(byte[] data, int ln, int pos)
          Gets the encoded string from the data array
private  void readExternal(byte[] data, WorkbookSettings ws)
          Reads the external data records
 
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.Type type
The type of this supbook record

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.Type INTERNAL

EXTERNAL

public static final SupbookRecord.Type EXTERNAL

ADDIN

public static final SupbookRecord.Type ADDIN

LINK

public static final SupbookRecord.Type LINK

UNKNOWN

public static final SupbookRecord.Type UNKNOWN
Constructor Detail

SupbookRecord

SupbookRecord(Record t,
              WorkbookSettings ws)
Constructs this object from the raw data
Parameters:
t - the raw data
Method Detail

readExternal

private void readExternal(byte[] data,
                          WorkbookSettings ws)
Reads the external data records
Parameters:
data -  

getType

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

getFileName

public java.lang.String getFileName()
Gets the name of the external file
Returns:
the name of the external file

getSheetName

public java.lang.String getSheetName(int i)
Gets the name of the external sheet
Parameters:
i - the index of the external sheet
Returns:
the name of the sheet

getData

public byte[] getData()
Gets the data - used when copying a spreadsheet
Returns:
the raw external sheet data

getEncodedFilename

private java.lang.String getEncodedFilename(byte[] data,
                                            int ln,
                                            int pos)
Gets the encoded string from the data array
Parameters:
data - the data
ln - length of the string
pos - the position in the array
Returns:
the string

getUnicodeEncodedFilename

private java.lang.String getUnicodeEncodedFilename(byte[] data,
                                                   int ln,
                                                   int pos)
Gets the encoded string from the data array
Parameters:
data - the data
ln - length of the string
pos - the position in the array
Returns:
the string