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

public Class EscherComplexProperty

extends EscherProperty
Class Inheritance
Known Direct Subclasses
org.apache.poi.ddf.EscherArrayProperty
Imports
java.util.Arrays, .Map, java.util.function.Supplier, org.apache.poi.util.GenericRecordUtil, .IOUtils, .LittleEndian

A complex property differs from a simple property in that the data can not fit inside a 32 bit integer. See the specification for more detailed information regarding exactly what is stored here.

Field Summary

Modifier and TypeField and Description
private byte[]
private static final int
private static int
Inherited from org.apache.poi.ddf.EscherProperty:
IS_BLIPIS_COMPLEX

Constructor Summary

AccessConstructor and Description
public
EscherComplexProperty(short
The id consists of the property number, a flag indicating whether this is a blip id and a flag indicating that this is a complex property.
id
,
int
The byte size of this property.
complexSize
)

Create a complex property using the property id and a byte array containing the complex data value size.

public
EscherComplexProperty(short
The property number
propertyNumber
,
boolean
Whether this is a blip id. Should be false.
isBlipId
,
int
The byte size of this property.
complexSize
)

Create a complex property using the property number, a flag to indicate whether this is a blip reference and the complex property data size.

public
EscherComplexProperty(EscherPropertyTypes
The property type
type
,
boolean
Whether this is a blip id. Should be false.
isBlipId
,
int
The byte size of this property.
complexSize
)

Create a complex property using the property type, a flag to indicate whether this is a blip reference and the complex property data size.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if the objects are equal.
equals
(Object
The object to compare to.
o
)

Overrides java.lang.Object.equals.

Determine whether this property is equal to another property.

public byte[]

Returns:

the complex bytes
getComplexData
()

Get the complex data value.

public Map<String, Supplier<?>>
public static int

Returns:

the max record length allowed for EscherComplexProperty
getMaxRecordLength
()

public int

Returns:

Number of bytes
getPropertySize
()

Overrides org.apache.poi.ddf.EscherProperty.getPropertySize.

Calculates the number of bytes required to serialize this property.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

protected void
resizeComplexData(int newSize)

protected void
resizeComplexData(int newSize, int copyLen)

public int

Returns:

The number of bytes serialized.
serializeComplexPart
(byte[]
The data array to serialize to
data
,
int
The offset within data to start serializing to.
pos
)

Implements abstract org.apache.poi.ddf.EscherProperty.serializeComplexPart.

Serializes the complex part of this property

public int
serializeSimplePart(byte[]
the buffer to write to
data
,
int
the starting position
pos
)

Implements abstract org.apache.poi.ddf.EscherProperty.serializeSimplePart.

Serializes the simple part of this property.

public int
setComplexData(byte[] complexData)

public int
setComplexData(byte[] complexData, int offset)

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

Inherited from org.apache.poi.ddf.EscherProperty:
getGenericChildrengetGenericRecordTypegetIdgetNamegetPropertyNumberisBlipIdisComplextoStringtoXml

Field Detail

complexDataback to summary
private byte[] complexData
DEFAULT_MAX_RECORD_LENGTHback to summary
private static final int DEFAULT_MAX_RECORD_LENGTH
MAX_RECORD_LENGTHback to summary
private static int MAX_RECORD_LENGTH

Constructor Detail

EscherComplexPropertyback to summary
public EscherComplexProperty(short id, int complexSize)

Create a complex property using the property id and a byte array containing the complex data value size.

Parameters
id:short

The id consists of the property number, a flag indicating whether this is a blip id and a flag indicating that this is a complex property.

complexSize:int

The byte size of this property.

EscherComplexPropertyback to summary
public EscherComplexProperty(short propertyNumber, boolean isBlipId, int complexSize)

Create a complex property using the property number, a flag to indicate whether this is a blip reference and the complex property data size.

Parameters
propertyNumber:short

The property number

isBlipId:boolean

Whether this is a blip id. Should be false.

complexSize:int

The byte size of this property.

EscherComplexPropertyback to summary
public EscherComplexProperty(EscherPropertyTypes type, boolean isBlipId, int complexSize)

Create a complex property using the property type, a flag to indicate whether this is a blip reference and the complex property data size.

Parameters
type:EscherPropertyTypes

The property type

isBlipId:boolean

Whether this is a blip id. Should be false.

complexSize:int

The byte size of this property.

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Determine whether this property is equal to another property.

Parameters
o:Object

The object to compare to.

Returns:boolean

True if the objects are equal.

Annotations
@Override
getComplexDataback to summary
public byte[] getComplexData()

Get the complex data value.

Returns:byte[]

the complex bytes

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

Overrides org.apache.poi.ddf.EscherProperty.getGenericProperties.

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

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

the max record length allowed for EscherComplexProperty

getPropertySizeback to summary
public int getPropertySize()

Overrides org.apache.poi.ddf.EscherProperty.getPropertySize.

Calculates the number of bytes required to serialize this property.

Returns:int

Number of bytes

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
resizeComplexDataback to summary
protected void resizeComplexData(int newSize)
resizeComplexDataback to summary
protected void resizeComplexData(int newSize, int copyLen)
serializeComplexPartback to summary
public int serializeComplexPart(byte[] data, int pos)

Implements abstract org.apache.poi.ddf.EscherProperty.serializeComplexPart.

Serializes the complex part of this property

Parameters
data:byte[]

The data array to serialize to

pos:int

The offset within data to start serializing to.

Returns:int

The number of bytes serialized.

Annotations
@Override
serializeSimplePartback to summary
public int serializeSimplePart(byte[] data, int pos)

Implements abstract org.apache.poi.ddf.EscherProperty.serializeSimplePart.

Serializes the simple part of this property. i.e. the first 6 bytes.

Parameters
data:byte[]

Doc from org.apache.poi.ddf.EscherProperty.serializeSimplePart.

the buffer to write to

pos:int

Doc from org.apache.poi.ddf.EscherProperty.serializeSimplePart.

the starting position

Returns:int

Doc from org.apache.poi.ddf.EscherProperty.serializeSimplePart.

the length of the part

Annotations
@Override
setComplexDataback to summary
public int setComplexData(byte[] complexData)
setComplexDataback to summary
public int setComplexData(byte[] complexData, int offset)
setMaxRecordLengthback to summary
public static void setMaxRecordLength(int length)
Parameters
length:int

the max record length allowed for EscherComplexProperty