Top Description Fields Constructors Methods
org.apache.poi.ddf

public abstract Class AbstractEscherOptRecord

extends EscherRecord
Class Inheritance
Known Direct Subclasses
org.apache.poi.ddf.EscherOptRecord, org.apache.poi.ddf.EscherTertiaryOptRecord
Imports
java.util.ArrayList, .Comparator, .List, .Map, java.util.function.Supplier, org.apache.poi.util.GenericRecordUtil, .LittleEndian

Common abstract class for EscherOptRecord and EscherTertiaryOptRecord

Field Summary

Modifier and TypeField and Description
private final List<EscherProperty>

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
public void
addEscherProperty(EscherProperty
the escher property to add
prop
)

Add a property to this record.

public int
fillFields(byte[]
The byte array containing the serialized escher records.
data
,
int
The offset into the byte array.
offset
,
EscherRecordFactory
A factory for creating new escher records.
recordFactory
)

Implements abstract org.apache.poi.ddf.EscherRecord.fillFields.

The contract of this method is to deserialize an escher record including its children.

public List<EscherProperty>

Returns:

the list of properties
getEscherProperties
()

The list of properties stored by this record.

public EscherProperty

Returns:

the escher property
getEscherProperty
(int
the ordinal index of the property
index
)

The list of properties stored by this record.

public Map<String, Supplier<?>>
private int
public int
getRecordSize()

Implements abstract org.apache.poi.ddf.EscherRecord.getRecordSize.

Subclasses should effeciently return the number of bytes required to serialize the record.

public <T extends EscherProperty> T
public <T extends EscherProperty> T
lookup(int propId)

public void
public int
serialize(int
the offset within the byte array
offset
,
byte[]
the data array to serialize to
data
,
EscherSerializationListener
a listener for begin and end serialization events. This is useful because the serialization is hierarchical/recursive and sometimes you need to be able break into that.
listener
)

Implements abstract org.apache.poi.ddf.EscherRecord.serialize.

Serializes the record to an existing byte array.

public void
setEscherProperty(EscherProperty
the property to set.
value
)

Set an escher property.

public void
sortProperties()

Records should be sorted by property number before being stored.

Inherited from org.apache.poi.ddf.EscherRecord:
copydisplayfillFieldsgetChildgetChildRecordsgetGenericChildrengetInstancegetOptionsgetRecordIdgetRecordNamegetVersionisContainerRecordreadHeaderreadInstanceserializeserializesetChildRecordssetInstancesetOptionssetRecordIdsetVersiontoStringtoXmltoXml

Field Detail

propertiesback to summary
private final List<EscherProperty> properties

Constructor Detail

AbstractEscherOptRecordback to summary
protected AbstractEscherOptRecord()
AbstractEscherOptRecordback to summary
protected AbstractEscherOptRecord(AbstractEscherOptRecord other)

Method Detail

addEscherPropertyback to summary
public void addEscherProperty(EscherProperty prop)

Add a property to this record.

Parameters
prop:EscherProperty

the escher property to add

fillFieldsback to summary
public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory)

Implements abstract org.apache.poi.ddf.EscherRecord.fillFields.

Doc from org.apache.poi.ddf.EscherRecord.fillFields.

The contract of this method is to deserialize an escher record including its children.

Parameters
data:byte[]

The byte array containing the serialized escher records.

offset:int

The offset into the byte array.

recordFactory:EscherRecordFactory

A factory for creating new escher records.

Returns:int

The number of bytes written.

Annotations
@Override
getEscherPropertiesback to summary
public List<EscherProperty> getEscherProperties()

The list of properties stored by this record.

Returns:List<EscherProperty>

the list of properties

getEscherPropertyback to summary
public EscherProperty getEscherProperty(int index)

The list of properties stored by this record.

Parameters
index:int

the ordinal index of the property

Returns:EscherProperty

the escher property

getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Overrides org.apache.poi.ddf.EscherRecord.getGenericProperties.

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getPropertiesSizeback to summary
private int getPropertiesSize()
getRecordSizeback to summary
public int getRecordSize()

Implements abstract org.apache.poi.ddf.EscherRecord.getRecordSize.

Doc from org.apache.poi.ddf.EscherRecord.getRecordSize.

Subclasses should effeciently return the number of bytes required to serialize the record.

Returns:int

number of bytes

Annotations
@Override
lookupback to summary
public <T extends EscherProperty> T lookup(EscherPropertyTypes propType)
lookupback to summary
public <T extends EscherProperty> T lookup(int propId)
Annotations
@SuppressWarnings:unchecked
removeEscherPropertyback to summary
public void removeEscherProperty(EscherPropertyTypes type)
serializeback to summary
public int serialize(int offset, byte[] data, EscherSerializationListener listener)

Implements abstract org.apache.poi.ddf.EscherRecord.serialize.

Doc from org.apache.poi.ddf.EscherRecord.serialize.

Serializes the record to an existing byte array.

Parameters
offset:int

the offset within the byte array

data:byte[]

the data array to serialize to

listener:EscherSerializationListener

a listener for begin and end serialization events. This is useful because the serialization is hierarchical/recursive and sometimes you need to be able break into that.

Returns:int

the number of bytes written.

Annotations
@Override
setEscherPropertyback to summary
public void setEscherProperty(EscherProperty value)

Set an escher property. If a property with given propId already exists it is replaced.

Parameters
value:EscherProperty

the property to set.

sortPropertiesback to summary
public void sortProperties()

Records should be sorted by property number before being stored.