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

SeriesTextRecord

public class SeriesTextRecord extends Record
Defines a series name NOTE: This source is automatically generated please do not modify this file. Either subclass or remove the record in src/records/definitions.
author
Andrew C. Oliver (acoliver at apache.org)

Fields Summary
public static final short
sid
private short
field_1_id
private byte
field_2_textLength
private byte
field_3_undocumented
private String
field_4_text
Constructors Summary
public SeriesTextRecord()



     
    

    
public SeriesTextRecord(RecordInputStream in)
Constructs a SeriesText record and sets its fields appropriately.

param
id id must be 0x100d or an exception will be throw upon validation
param
size size the size of the data area of the record
param
data data of the record (should not contain sid/len)

        super(in);
    
    
Methods Summary
public java.lang.Objectclone()

        SeriesTextRecord rec = new SeriesTextRecord();
    
        rec.field_1_id = field_1_id;
        rec.field_2_textLength = field_2_textLength;
        rec.field_3_undocumented = field_3_undocumented;
        rec.field_4_text = field_4_text;
        return rec;
    
protected voidfillFields(org.apache.poi.hssf.record.RecordInputStream in)

        field_1_id                     = in.readShort();
        field_2_textLength             = in.readByte();
        field_3_undocumented           = in.readByte();
        field_4_text                   = in.readUnicodeLEString(field_2_textLength);
    
public shortgetId()
Get the id field for the SeriesText record.

        return field_1_id;
    
public intgetRecordSize()
Size of record (exluding 4 byte header)

        return 4  + 2 + 1 + 1 + (field_2_textLength *2);
    
public shortgetSid()

        return sid;
    
public java.lang.StringgetText()
Get the text field for the SeriesText record.

        return field_4_text;
    
public bytegetTextLength()
Get the text length field for the SeriesText record.

        return field_2_textLength;
    
public bytegetUndocumented()
Get the undocumented field for the SeriesText record.

        return field_3_undocumented;
    
public intserialize(int offset, byte[] data)

        int pos = 0;

        LittleEndian.putShort(data, 0 + offset, sid);
        LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));

        LittleEndian.putShort(data, 4 + offset + pos, field_1_id);
        data[ 6 + offset + pos ] = field_2_textLength;
        data[ 7 + offset + pos ] = field_3_undocumented;
        StringUtil.putUnicodeLE(field_4_text, data, 8 + offset + pos);

        return getRecordSize();
    
public voidsetId(short field_1_id)
Set the id field for the SeriesText record.

        this.field_1_id = field_1_id;
    
public voidsetText(java.lang.String field_4_text)
Set the text field for the SeriesText record.

        this.field_4_text = field_4_text;
    
public voidsetTextLength(byte field_2_textLength)
Set the text length field for the SeriesText record.

        this.field_2_textLength = field_2_textLength;
    
public voidsetUndocumented(byte field_3_undocumented)
Set the undocumented field for the SeriesText record.

        this.field_3_undocumented = field_3_undocumented;
    
public java.lang.StringtoString()

        StringBuffer buffer = new StringBuffer();

        buffer.append("[SERIESTEXT]\n");
        buffer.append("    .id                   = ")
            .append("0x").append(HexDump.toHex(  getId ()))
            .append(" (").append( getId() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .textLength           = ")
            .append("0x").append(HexDump.toHex(  getTextLength ()))
            .append(" (").append( getTextLength() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .undocumented         = ")
            .append("0x").append(HexDump.toHex(  getUndocumented ()))
            .append(" (").append( getUndocumented() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .text                 = ")
            .append(" (").append( getText() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 

        buffer.append("[/SERIESTEXT]\n");
        return buffer.toString();
    
protected voidvalidateSid(short id)
Checks the sid matches the expected side for this record

param
id the expected sid.

        if (id != sid)
        {
            throw new RecordFormatException("Not a SeriesText record");
        }