FileDocCategorySizeDatePackage
SSTRecordSizeCalculator.javaAPI DocApache Poi 3.0.11937Mon Jan 01 12:39:40 GMT 2007org.apache.poi.hssf.record

SSTRecordSizeCalculator

public class SSTRecordSizeCalculator extends Object
Used to calculate the record sizes for a particular record. This kind of sucks because it's similar to the SST serialization code. In general the SST serialization code needs to be rewritten.
author
Glen Stampoultzis (glens at apache.org)
author
Jason Height (jheight at apache.org)

Fields Summary
private IntMapper
strings
Constructors Summary
public SSTRecordSizeCalculator(IntMapper strings)

        this.strings = strings;
    
Methods Summary
public intgetRecordSize()

        UnicodeString.UnicodeRecordStats rs = new UnicodeString.UnicodeRecordStats();
        rs.remainingSize -= SSTRecord.SST_RECORD_OVERHEAD;
        rs.recordSize += SSTRecord.SST_RECORD_OVERHEAD;
        for (int i=0; i < strings.size(); i++ )
        {
          UnicodeString unistr = ( (UnicodeString) strings.get(i));
          unistr.getRecordSize(rs);
    }
        return rs.recordSize;