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.
|
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
public Record findFirstOfType(long type)
public Record removeChild(Record ch)
ch
- the child to removepublic int appendChildRecord(Record newChild)
newChild
- the child record to be addedpublic int addChildAfter(Record newChild, Record after)
newChild
- The record to add as new child.after
- The record after which the given record should be added.public int addChildBefore(Record newChild, Record before)
newChild
- The record to add as new child.before
- The record before which the given record should be added.public void setChildRecord(Record[] records)
records
- the new child recordspublic void writeOut(byte headerA, byte headerB, long type, Record[] children, java.io.OutputStream out) throws java.io.IOException
headerA
- the first byte of the headerheaderB
- the second byte of the headertype
- the record typechildren
- our child recordsout
- the stream to write tojava.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.