public final class EscherArrayProperty extends EscherComplexProperty implements java.lang.Iterable<byte[]>
Constructor and Description |
---|
EscherArrayProperty(EscherPropertyTypes type, boolean isBlipId, int complexSize)
Create an instance of an escher array property.
|
EscherArrayProperty(short propertyNumber, boolean isBlipId, byte[] complexData)
|
EscherArrayProperty(short id, int complexSize)
Create an instance of an escher array property.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getElement(int index) |
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
int |
getNumberOfElementsInArray() |
int |
getNumberOfElementsInMemory() |
short |
getSizeOfElements() |
java.util.Iterator<byte[]> |
iterator() |
int |
serializeSimplePart(byte[] data, int pos)
Serializes the simple part of this property.
(序列化此属性的简单部分。)
|
int |
setArrayData(byte[] data, int offset)
We have this method because the way in which arrays in escher works is screwed for seemly arbitrary reasons.
(我们有这种方法是因为 escher 中的数组的工作方式似乎出于任意原因而被搞砸了。)
|
void |
setElement(int index, byte[] element) |
void |
setNumberOfElementsInArray(int numberOfElements) |
void |
setNumberOfElementsInMemory(int numberOfElements) |
void |
setSizeOfElements(int sizeOfElements) |
equals, getComplexData, getPropertySize, hashCode, resizeComplexData, resizeComplexData, serializeComplexPart, setComplexData, setComplexData
getGenericChildren, getGenericRecordType, getId, getName, getPropertyNumber, isBlipId, isComplex, toString, toXml
@Internal public EscherArrayProperty(short id, int complexSize)
EscherArrayProperty(EscherPropertyTypes, boolean, int)
with
EscherComplexProperty.setComplexData(byte[])
.
(创建一个 escher 数组属性的实例。此构造函数可用于创建 complexSize = 0 的 emptyComplexParts。最好将 EscherArrayProperty(EscherPropertyTypes, boolean, int) 与 EscherComplexProperty.setComplexData(byte[]) 一起使用。)
id
- 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 - id 由属性编号、指示这是否是 blip id 的标志和指示这是复杂属性的标志组成。)
complexSize
- the data size
(complexSize - 数据大小)
@Deprecated @Removal(version="5.0.0") public EscherArrayProperty(short propertyNumber, boolean isBlipId, byte[] complexData)
EscherArrayProperty(EscherPropertyTypes, boolean, int)
and EscherComplexProperty.setComplexData(byte[])
propertyNumber
- the property number part of the property id
(propertyNumber - 属性 id 的属性编号部分)
isBlipId
-
true
, if it references a blip
(isBlipId - true,如果它引用了一个 blip)
complexData
- the data
(complexData - 数据)
public EscherArrayProperty(EscherPropertyTypes type, boolean isBlipId, int complexSize)
type
- the property type of the property id
(type - 属性 id 的属性类型)
isBlipId
-
true
, if it references a blip
(isBlipId - true,如果它引用了一个 blip)
complexSize
- the data size
(complexSize - 数据大小)
public int getNumberOfElementsInArray()
public void setNumberOfElementsInArray(int numberOfElements)
public int getNumberOfElementsInMemory()
public void setNumberOfElementsInMemory(int numberOfElements)
public short getSizeOfElements()
public void setSizeOfElements(int sizeOfElements)
public byte[] getElement(int index)
public void setElement(int index, byte[] element)
public int setArrayData(byte[] data, int offset)
data
- The data array containing the escher array information
(data - 包含 escher 数组信息的数据数组)
offset
- The offset into the array to start reading from.
(offset - 要开始读取的数组的偏移量。)
public int serializeSimplePart(byte[] data, int pos)
serializeSimplePart
in class
EscherComplexProperty
data
- the buffer to write to
(data - 要写入的缓冲区)
pos
- the starting position
(pos - 起始位置)
public java.util.Iterator<byte[]> iterator()
iterator
in interface
java.lang.Iterable<byte[]>
(接口 java.lang.Iterable 中的迭代器
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericProperties)
getGenericProperties
in class
EscherComplexProperty
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.