jxl.write.biff
Class SSTRecord

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

class SSTRecord
extends WritableRecordData

A shared string table record.


Field Summary
private  int byteCount
          The count of bytes needed so far to contain this record
private  byte[] data
          The binary data
private static int maxBytes
          The maximum amount of bytes available for the SST record
private  int numReferences
          The number of string references in the workbook
private  int numStrings
          The number of strings in this table
private  java.util.ArrayList stringLengths
          The list of string lengths
private  java.util.ArrayList strings
          The list of strings
 
Fields inherited from class jxl.biff.WritableRecordData
maxRecordLength
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
SSTRecord(int numRefs, int s)
          Constructor
 
Method Summary
 int add(java.lang.String s)
          Adds a string to this SST record.
 byte[] getData()
          Gets the binary data for output to file
 int getOffset()
          Gets the current offset into this record, excluding the header fields
 
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

numReferences

private int numReferences
The number of string references in the workbook

numStrings

private int numStrings
The number of strings in this table

strings

private java.util.ArrayList strings
The list of strings

stringLengths

private java.util.ArrayList stringLengths
The list of string lengths

data

private byte[] data
The binary data

byteCount

private int byteCount
The count of bytes needed so far to contain this record

maxBytes

private static int maxBytes
The maximum amount of bytes available for the SST record
Constructor Detail

SSTRecord

public SSTRecord(int numRefs,
                 int s)
Constructor
Parameters:
numRefs - the number of string references in the workbook
s - the number of strings
Method Detail

add

public int add(java.lang.String s)
Adds a string to this SST record. It returns the number of string characters not added, due to space constraints. In the event of this being non-zero, a continue record will be needed
Parameters:
s - the string to add
Returns:
the number of characters not added

getOffset

public int getOffset()
Gets the current offset into this record, excluding the header fields
Returns:
the number of bytes after the header field

getData

public byte[] getData()
Gets the binary data for output to file
Overrides:
getData in class WritableRecordData
Returns:
the binary data