public abstract class RecordContainer extends Record
Constructor and Description |
---|
RecordContainer() |
Modifier and Type | Method and Description |
---|---|
int |
addChildAfter(Record newChild, Record after)
Adds the given Child Record after the supplied record
(在提供的记录之后添加给定的子记录)
|
int |
addChildBefore(Record newChild, Record before)
Adds the given Child Record before the supplied record
(在提供的记录之前添加给定的子记录)
|
int |
appendChildRecord(Record newChild)
Add a new child record onto a record's list of children.
(将新的子记录添加到记录的子列表中。)
|
Record |
findFirstOfType(long type)
Finds the first child record of the given type, or null if none of the child records are of the given type.
(查找给定类型的第一个子记录,如果没有任何子记录属于给定类型,则为 null。)
|
Record[] |
getChildRecords()
Return any children
(返回任何孩子)
|
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
static void |
handleParentAwareRecords(RecordContainer br)
Find the records that are parent-aware, and tell them who their parent is
(找到知道父母的记录,并告诉他们他们的父母是谁)
|
boolean |
isAnAtom()
We're not an atom
(我们不是原子)
|
Record |
removeChild(Record ch)
Remove a child record from this record container
(从此记录容器中删除子记录)
|
void |
setChildRecord(Record[] records)
Set child records.
(设置子记录。)
|
void |
writeOut(byte headerA, byte headerB, long type, Record[] children, java.io.OutputStream out)
Write out our header, and our children.
(写出我们的标题和我们的孩子。)
|
buildRecordAtOffset, createRecordForType, findChildRecords, getGenericChildren, getGenericRecordType, getRecordType, writeLittleEndian, writeLittleEndian, writeOut
protected Record[] _children
public Record[] getChildRecords()
getChildRecords
in class
Record
(类 Record 中的 getChildRecords)
public boolean isAnAtom()
public Record findFirstOfType(long type)
public Record removeChild(Record ch)
ch
- the child to remove
(ch - 要移除的孩子)
public int appendChildRecord(Record newChild)
newChild
- the child record to be added
(newChild - 要添加的子记录)
public int addChildAfter(Record newChild, Record after)
newChild
- The record to add as new child.
(newChild - 要添加为新子项的记录。)
after
- The record after which the given record should be added.
(after - 应该添加给定记录的记录。)
public int addChildBefore(Record newChild, Record before)
newChild
- The record to add as new child.
(newChild - 要添加为新子项的记录。)
before
- The record before which the given record should be added.
(before - 应在其之前添加给定记录的记录。)
public void setChildRecord(Record[] records)
records
- the new child records
(记录 - 新的子记录)
public void writeOut(byte headerA, byte headerB, long type, Record[] children, java.io.OutputStream out) throws java.io.IOException
headerA
- the first byte of the header
(headerA - 标头的第一个字节)
headerB
- the second byte of the header
(headerB - 标头的第二个字节)
type
- the record type
(type - 记录类型)
children
- our child records
(孩子——我们的孩子记录)
out
- the stream to write to
(out - 要写入的流)
java.io.IOException
(java.io.IOException)
public static void handleParentAwareRecords(RecordContainer br)
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.