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

public final Class UnknownEscherRecord

extends EscherRecord
Class Inheritance
Imports
java.util.ArrayList, .List, .Map, java.util.function.Supplier, org.apache.poi.util.GenericRecordUtil, .HexDump, .IOUtils, .LittleEndian

This record is used whenever an escher record is encountered that we do not explicitly support.

Field Summary

Modifier and TypeField and Description
private final List<EscherRecord>
private static final int
private static final int
private static int
private static final byte[]
private byte[]
thedata

The data for this record not including the 8 byte header

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
public UnknownEscherRecord
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.

pack-priv int
fillFields(byte[] data, int offset, EscherRecordFactory recordFactory, int nesting)

public List<EscherRecord>
public byte[]

Returns:

the data which makes up this record
getData
()

public Map<String, Supplier<?>>
public Enum<E extends Enum<E>>
public static int

Returns:

the max record length allowed for UnknownEscherRecord
getMaxRecordLength
()

public String
getRecordName()

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

Subclasses should return the short name for this escher record.

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 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
setChildRecords(List<EscherRecord>
Not used in base implementation.
childRecords
)

Overrides org.apache.poi.ddf.EscherRecord.setChildRecords.

Sets the child records for this record.

public static void
setMaxRecordLength(int
the max record length allowed for UnknownEscherRecord
length
)

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

Field Detail

_childRecordsback to summary
private final List<EscherRecord> _childRecords
DEFAULT_MAX_RECORD_LENGTHback to summary
private static final int DEFAULT_MAX_RECORD_LENGTH
MAX_NESTED_CHILD_NODESback to summary
private static final int MAX_NESTED_CHILD_NODES
MAX_RECORD_LENGTHback to summary
private static int MAX_RECORD_LENGTH
NO_BYTESback to summary
private static final byte[] NO_BYTES
thedataback to summary
private byte[] thedata

The data for this record not including the 8 byte header

Constructor Detail

UnknownEscherRecordback to summary
public UnknownEscherRecord()
UnknownEscherRecordback to summary
public UnknownEscherRecord(UnknownEscherRecord other)

Method Detail

addChildRecordback to summary
public void addChildRecord(EscherRecord childRecord)
copyback to summary
public UnknownEscherRecord copy()

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

Implements org.apache.poi.common.Duplicatable.copy.

Returns:UnknownEscherRecord

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
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
fillFieldsback to summary
pack-priv int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory, int nesting)
getChildRecordsback to summary
public List<EscherRecord> getChildRecords()

Overrides org.apache.poi.ddf.EscherRecord.getChildRecords.

Returns:List<EscherRecord>

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

Returns the children of this record. By default this will be an empty list. EscherCotainerRecord is the only record that may contain children.

Annotations
@Override
getDataback to summary
public byte[] getData()
Returns:byte[]

the data which makes up this record

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
getGenericRecordTypeback to summary
public Enum<E extends Enum<E>> getGenericRecordType()

Overrides default org.apache.poi.common.usermodel.GenericRecord.getGenericRecordType.

Annotations
@Override
getMaxRecordLengthback to summary
public static int getMaxRecordLength()
Returns:int

the max record length allowed for UnknownEscherRecord

getRecordNameback to summary
public String getRecordName()

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

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

Subclasses should return the short name for this escher record.

Returns:String

the short name for this escher record

Annotations
@Override
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
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
setChildRecordsback to summary
public void setChildRecords(List<EscherRecord> childRecords)

Overrides org.apache.poi.ddf.EscherRecord.setChildRecords.

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

Sets the child records for this record. By default this will throw an exception as only EscherContainerRecords may have children.

Parameters
childRecords:List<EscherRecord>

Not used in base implementation.

Annotations
@Override
setMaxRecordLengthback to summary
public static void setMaxRecordLength(int length)
Parameters
length:int

the max record length allowed for UnknownEscherRecord