Top Description Constructors Methods
org.apache.poi.hssf.record.cont

public abstract Class ContinuableRecord

extends Record
Class Inheritance
Known Direct Subclasses
org.apache.poi.hssf.record.ExtSSTRecord, org.apache.poi.hssf.record.NameRecord, org.apache.poi.hssf.record.SSTRecord, org.apache.poi.hssf.record.StringRecord, org.apache.poi.hssf.record.TextObjectRecord
Imports
java.io.IOException, org.apache.poi.hssf.record.ContinueRecord, .Record, org.apache.poi.util.LittleEndianByteArrayOutputStream, .LittleEndianOutput

Common superclass of all records that can produce ContinueRecords while being serialized.

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
public final int

Returns:

the total length of the encoded record(s) (Note - if any ContinueRecord is required, this result includes the size of those too)
getRecordSize
()

Implements abstract org.apache.poi.hssf.record.RecordBase.getRecordSize.

gives the current serialized size of the record.

protected abstract void
serialize(ContinuableRecordOutput
a data output stream
out
)

Serializes this record's content to the supplied data output.

public final int
serialize(int
to begin writing at
offset
,
byte[]
byte array containing instance data
data
)

Implements abstract org.apache.poi.hssf.record.RecordBase.serialize.

called by the class that is responsible for writing this sucker.

Inherited from org.apache.poi.hssf.record.Record:
cloneViaReserialisecopygetGenericRecordTypegetSidserializetoString

Constructor Detail

ContinuableRecordback to summary
protected ContinuableRecord()
ContinuableRecordback to summary
protected ContinuableRecord(ContinuableRecord other)

Method Detail

getRecordSizeback to summary
public final int getRecordSize()

Implements abstract org.apache.poi.hssf.record.RecordBase.getRecordSize.

Doc from org.apache.poi.hssf.record.RecordBase.getRecordSize.

gives the current serialized size of the record. Should include the sid and reclength (4 bytes).

Returns:int

the total length of the encoded record(s) (Note - if any ContinueRecord is required, this result includes the size of those too)

Annotations
@Override
serializeback to summary
protected abstract void serialize(ContinuableRecordOutput out)

Serializes this record's content to the supplied data output.

The standard BIFF header (ushort sid, ushort size) has been handled by the superclass, so only BIFF data should be written by this method. Simple data types can be written with the standard LittleEndianOutput methods. Methods from ContinuableRecordOutput can be used to serialize strings (with ContinueRecords being written as required). If necessary, implementors can explicitly start ContinueRecords (regardless of the amount of remaining space).

Parameters
out:ContinuableRecordOutput

a data output stream

serializeback to summary
public final int serialize(int offset, byte[] data)

Implements abstract org.apache.poi.hssf.record.RecordBase.serialize.

Doc from org.apache.poi.hssf.record.RecordBase.serialize.

called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.

Parameters
offset:int

to begin writing at

data:byte[]

byte array containing instance data

Returns:int

number of bytes written

Annotations
@Override