jxl.write.biff
Class SSTContinueRecord

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

class SSTContinueRecord
extends WritableRecordData

A continuation of 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  java.lang.String firstString
          The first string is a special case
private  int firstStringLength
          The length of the first string
private  boolean includeLength
          Indicates whether or not we need to include the length information for the first string
private static int maxBytes
          The maximum amount of bytes available for the SST record
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
SSTContinueRecord()
          Constructor
 
Method Summary
 int add(java.lang.String s)
          Adds a string to this record.
 byte[] getData()
          Gets the binary data for output to file
 int getOffset()
          Gets the current offset into this record, excluding the header fields
 int setFirstString(java.lang.String s, boolean b)
          Adds the first string to this SST 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

firstString

private java.lang.String firstString
The first string is a special case

includeLength

private boolean includeLength
Indicates whether or not we need to include the length information for the first string

firstStringLength

private int firstStringLength
The length of the first string

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

SSTContinueRecord

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

setFirstString

public int setFirstString(java.lang.String s,
                          boolean b)
Adds the first string to this SST record
Parameters:
s - the string to add
b - include the length information for the first string
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

add

public int add(java.lang.String s)
Adds a string to this 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

getData

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