jxl.read.biff
Class SSTRecord

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

class SSTRecord
extends RecordData

Holds all the strings in the shared string table


Inner Class Summary
private static class SSTRecord.BooleanHolder
          A holder for a boolean
private static class SSTRecord.ByteArrayHolder
          A holder for a byte array
 
Field Summary
private  int[] continuationBreaks
          The array of continuation breaks
private  java.lang.String[] strings
          The shared strings
private  int totalStrings
          The total number of strings in this table
private  int uniqueStrings
          The number of unique strings
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
SSTRecord(Record t, Record[] continuations, WorkbookSettings ws)
          Constructs this object from the raw data
 
Method Summary
private  int getChars(byte[] source, SSTRecord.ByteArrayHolder bah, int pos, SSTRecord.BooleanHolder ascii, int numChars)
          Gets the chars in the ascii array, taking into account continuation breaks
private  int getContinuedString(byte[] source, SSTRecord.ByteArrayHolder bah, int destPos, int contBreakIndex, SSTRecord.BooleanHolder ascii, int charsLeft)
          Gets the rest of the string after a continuation break
 java.lang.String getString(int index)
          Gets the string at the specified position
private  void readStrings(byte[] data, int offset, WorkbookSettings ws)
          Reads in all the strings from the raw data
 
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

totalStrings

private int totalStrings
The total number of strings in this table

uniqueStrings

private int uniqueStrings
The number of unique strings

strings

private java.lang.String[] strings
The shared strings

continuationBreaks

private int[] continuationBreaks
The array of continuation breaks
Constructor Detail

SSTRecord

public SSTRecord(Record t,
                 Record[] continuations,
                 WorkbookSettings ws)
Constructs this object from the raw data
Parameters:
t - the raw data
continuations - the continuations
ws - the workbook settings
Method Detail

readStrings

private void readStrings(byte[] data,
                         int offset,
                         WorkbookSettings ws)
Reads in all the strings from the raw data
Parameters:
data - the raw data
offset -  
ws - the workbook settings

getChars

private int getChars(byte[] source,
                     SSTRecord.ByteArrayHolder bah,
                     int pos,
                     SSTRecord.BooleanHolder ascii,
                     int numChars)
Gets the chars in the ascii array, taking into account continuation breaks
Returns:
the number of bytes read from the source

getContinuedString

private int getContinuedString(byte[] source,
                               SSTRecord.ByteArrayHolder bah,
                               int destPos,
                               int contBreakIndex,
                               SSTRecord.BooleanHolder ascii,
                               int charsLeft)
Gets the rest of the string after a continuation break

getString

public java.lang.String getString(int index)
Gets the string at the specified position
Parameters:
index - the index of the string to return
Returns:
the strings