public abstract class RecordContainer extends Record
| Constructor and Description |
|---|
RecordContainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildAfter(Record newChild,
Record after)
Adds the given Child Record after the supplied record
|
void |
addChildBefore(Record newChild,
Record before)
Adds the given Child Record before the supplied record
|
void |
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
|
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
|
void |
moveChildBefore(Record child,
Record before)
Moves the given Child Record to before the supplied record
|
void |
moveChildrenAfter(Record firstChild,
int number,
Record after)
Moves the given Child Records to after the supplied record
|
void |
moveChildrenBefore(Record firstChild,
int number,
Record before)
Moves the given Child Records to before the supplied record
|
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,
OutputStream out)
Write out our header, and our children.
|
buildRecordAtOffset, createRecordForType, findChildRecords, getRecordType, writeLittleEndian, writeLittleEndian, writeOutprotected Record[] _children
public Record[] getChildRecords()
getChildRecords in class Recordpublic Record findFirstOfType(long type)
public Record removeChild(Record ch)
ch - the child to removepublic void appendChildRecord(Record newChild)
public void addChildAfter(Record newChild, Record after)
newChild - after - public void addChildBefore(Record newChild, Record before)
newChild - before - public void moveChildBefore(Record child, Record before)
public void moveChildrenBefore(Record firstChild, int number, Record before)
public void moveChildrenAfter(Record firstChild, int number, Record after)
public void setChildRecord(Record[] records)
records - the new child recordspublic void writeOut(byte headerA,
byte headerB,
long type,
Record[] children,
OutputStream out)
throws IOException
headerA - the first byte of the headerheaderB - the second byte of the headertype - the record typechildren - our child recordsout - the stream to write toIOExceptionpublic static void handleParentAwareRecords(RecordContainer br)
Copyright © 2020. All rights reserved.