public final class EscherContainerRecord extends EscherRecord implements java.lang.Iterable<EscherRecord>
Modifier and Type | Field and Description |
---|---|
static short |
BSTORE_CONTAINER |
static short |
DG_CONTAINER |
static short |
DGG_CONTAINER |
static short |
SOLVER_CONTAINER |
static short |
SP_CONTAINER |
static short |
SPGR_CONTAINER |
Constructor and Description |
---|
EscherContainerRecord() |
EscherContainerRecord(EscherContainerRecord other) |
Modifier and Type | Method and Description |
---|---|
void |
addChildBefore(EscherRecord record, int insertBeforeRecordId)
Add a child record before the record with given recordId
(在具有给定 recordId 的记录之前添加子记录)
|
void |
addChildRecord(EscherRecord record)
Append a child record
(追加子记录)
|
EscherContainerRecord |
copy() |
void |
display(java.io.PrintWriter w, int indent)
The display methods allows escher variables to print the record names according to their hierarchy.
(显示方法允许 escher 变量根据其层次结构打印记录名称。)
|
int |
fillFields(byte[] data, int pOffset, EscherRecordFactory recordFactory)
The contract of this method is to deserialize an escher record including it's children.
(此方法的约定是反序列化包括其子项的 escher 记录。)
|
EscherRecord |
getChild(int index)
Returns the indexed child record.
(返回索引的子记录。)
|
<T extends EscherRecord> |
getChildById(short recordId) |
java.util.List<EscherContainerRecord> |
getChildContainers()
Returns all of our children which are also EscherContainers (may be 0, 1, or vary rarely 2 or 3)
(返回我们所有也是 EscherContainers 的孩子(可能是 0、1,或者很少变化 2 或 3))
|
java.util.List<EscherRecord> |
getChildRecords() |
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
java.lang.Enum |
getGenericRecordType() |
java.lang.String |
getRecordName()
Subclasses should return the short name for this escher record.
(子类应返回此 escher 记录的短名称。)
|
void |
getRecordsById(short recordId, java.util.List<EscherRecord> out)
Recursively find records with the specified record ID
(递归查找具有指定记录 ID 的记录)
|
int |
getRecordSize()
Subclasses should effeciently return the number of bytes required to serialize the record.
(子类应该有效地返回序列化记录所需的字节数。)
|
boolean |
hasChildOfType(short recordId)
Do any of our (top level) children have the given recordId?
(我们的(顶级)孩子中是否有给定的recordId?)
|
java.util.Iterator<EscherRecord> |
iterator() |
boolean |
removeChildRecord(EscherRecord toBeRemoved)
Removes the given escher record from the child list
(从子列表中删除给定的 escher 记录)
|
int |
serialize(int offset, byte[] data, EscherSerializationListener listener)
Serializes the record to an existing byte array.
(将记录序列化为现有字节数组。)
|
void |
setChildRecords(java.util.List<EscherRecord> childRecords)
replaces the internal child list with the contents of the supplied
childRecords
(用提供的 childRecords 的内容替换内部子列表)
|
fillFields, getGenericChildren, getInstance, getOptions, getRecordId, getVersion, isContainerRecord, readHeader, readInstance, serialize, serialize, setInstance, setOptions, setRecordId, setVersion, toString, toXml, toXml
public static final short DGG_CONTAINER
public static final short BSTORE_CONTAINER
public static final short DG_CONTAINER
public static final short SPGR_CONTAINER
public static final short SP_CONTAINER
public static final short SOLVER_CONTAINER
public EscherContainerRecord()
public EscherContainerRecord(EscherContainerRecord other)
public int fillFields(byte[] data, int pOffset, EscherRecordFactory recordFactory)
EscherRecord
fillFields
in class
EscherRecord
(EscherRecord 类中的填充字段)
data
- The byte array containing the serialized escher records.
(data - 包含序列化 escher 记录的字节数组。)
pOffset
- The offset into the byte array.
(pOffset - 字节数组的偏移量。)
recordFactory
- A factory for creating new escher records.
(recordFactory - 用于创建新 escher 记录的工厂。)
public int serialize(int offset, byte[] data, EscherSerializationListener listener)
EscherRecord
serialize
in class
EscherRecord
(在类 EscherRecord 中序列化)
offset
- the offset within the byte array
(offset - 字节数组中的偏移量)
data
- the data array to serialize to
(data - 要序列化到的数据数组)
listener
- 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 - 开始和结束序列化事件的侦听器。这很有用,因为序列化是分层/递归的,有时您需要能够打破它。)
public int getRecordSize()
EscherRecord
getRecordSize
in class
EscherRecord
(类 EscherRecord 中的 getRecordSize)
public boolean hasChildOfType(short recordId)
recordId
- the recordId of the child
(recordId - 孩子的 recordId)
public EscherRecord getChild(int index)
EscherRecord
getChild
in class
EscherRecord
index
- the index of the child within the child records
(index - 子记录中的子索引)
public java.util.List<EscherRecord> getChildRecords()
getChildRecords
in class
EscherRecord
EscherContainerRecord
public java.util.Iterator<EscherRecord> iterator()
iterator
in interface
java.lang.Iterable<EscherRecord>
(接口 java.lang.Iterable 中的迭代器
public void setChildRecords(java.util.List<EscherRecord> childRecords)
setChildRecords
in class
EscherRecord
childRecords
- Not used in base implementation.
(childRecords - 不在基本实现中使用。)
public boolean removeChildRecord(EscherRecord toBeRemoved)
toBeRemoved
- the escher record to be removed
(toBeRemoved - 要删除的 escher 记录)
public java.util.List<EscherContainerRecord> getChildContainers()
public java.lang.String getRecordName()
EscherRecord
getRecordName
in class
EscherRecord
(类 EscherRecord 中的 getRecordName)
public void display(java.io.PrintWriter w, int indent)
EscherRecord
display
in class
EscherRecord
w
- The print writer to output to.
(w - 要输出到的打印编写器。)
indent
- The current indent level.
(indent - 当前缩进级别。)
public void addChildRecord(EscherRecord record)
record
- the record to be added
(record - 要添加的记录)
public void addChildBefore(EscherRecord record, int insertBeforeRecordId)
record
- the record to be added
(record - 要添加的记录)
insertBeforeRecordId
- the recordId of the next sibling
(insertBeforeRecordId - 下一个兄弟的 recordId)
public <T extends EscherRecord> T getChildById(short recordId)
public void getRecordsById(short recordId, java.util.List<EscherRecord> out)
recordId
- the recordId to be searched for
(recordId - 要搜索的 recordId)
out
- - list to store found records
(out - 列表存储找到的记录)
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericProperties)
getGenericProperties
in class
EscherRecord
public java.lang.Enum getGenericRecordType()
getGenericRecordType
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericRecordType)
public EscherContainerRecord copy()
copy
in interface
Duplicatable
(复制到界面 Duplicatable)
copy
in class
EscherRecord
(在 EscherRecord 类中复制)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.