Package org.apache.poi.hslf.record
Class RecordContainer
java.lang.Object
org.apache.poi.hslf.record.Record
org.apache.poi.hslf.record.RecordContainer
- Direct Known Subclasses:
AnimationInfo
,Comment2000
,DocInfoListContainer
,DummyRecordWithChildren
,EscherTextboxWrapper
,ExEmbed
,ExHyperlink
,ExMCIMovie
,ExObjList
,ExVideoContainer
,FontCollection
,HeadersFootersContainer
,InteractiveInfo
,PositionDependentRecordContainer
,SlideListWithText
,Sound
,SoundCollection
,VBAInfoContainer
Abstract class which all container records will extend. Providers
helpful methods for writing child records out to disk
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
addChildAfter
(Record newChild, Record after) Adds the given Child Record after the supplied recordint
addChildBefore
(Record newChild, Record before) Adds the given Child Record before the supplied recordint
appendChildRecord
(Record newChild) Add a new child record onto a record's list of children.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[]
Return any childrenstatic void
Find the records that are parent-aware, and tell them who their parent isboolean
isAnAtom()
We're not an atomvoid
moveChildBefore
(Record child, Record before) Deprecated.method is not used within POI and will be removedvoid
moveChildrenAfter
(Record firstChild, int number, Record after) Deprecated.method is not used within POI and will be removedvoid
moveChildrenBefore
(Record firstChild, int number, Record before) Deprecated.method is not used within POI and will be removedremoveChild
(Record ch) Remove a child record from this record containervoid
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.Methods inherited from class org.apache.poi.hslf.record.Record
buildRecordAtOffset, createRecordForType, findChildRecords, getRecordType, writeLittleEndian, writeLittleEndian, writeOut
-
Field Details
-
_children
-
-
Constructor Details
-
RecordContainer
public RecordContainer()
-
-
Method Details
-
getChildRecords
Return any children- Specified by:
getChildRecords
in classRecord
-
isAnAtom
public boolean isAnAtom()We're not an atom -
findFirstOfType
Finds the first child record of the given type, or null if none of the child records are of the given type. Does not descend. -
removeChild
Remove a child record from this record container- Parameters:
ch
- the child to remove- Returns:
- the removed record
-
appendChildRecord
Add a new child record onto a record's list of children.- Parameters:
newChild
- the child record to be added- Returns:
- the position of the added child within the list, i.e. the last index
-
addChildAfter
Adds the given Child Record after the supplied record- Parameters:
newChild
- The record to add as new child.after
- The record after which the given record should be added.- Returns:
- the position of the added child within the list
-
addChildBefore
Adds the given Child Record before the supplied record- Parameters:
newChild
- The record to add as new child.before
- The record before which the given record should be added.- Returns:
- the position of the added child within the list
-
moveChildBefore
Deprecated.method is not used within POI and will be removedMoves the given Child Record to before the supplied record -
moveChildrenBefore
@Removal(version="3.19") @Deprecated public void moveChildrenBefore(Record firstChild, int number, Record before) Deprecated.method is not used within POI and will be removedMoves the given Child Records to before the supplied record -
moveChildrenAfter
@Removal(version="3.19") @Deprecated public void moveChildrenAfter(Record firstChild, int number, Record after) Deprecated.method is not used within POI and will be removedMoves the given Child Records to after the supplied record- Parameters:
firstChild
- the first child to be movednumber
- the number of records to moveafter
- the record after that the children are moved
-
setChildRecord
Set child records.- Parameters:
records
- the new child records
-
writeOut
public void writeOut(byte headerA, byte headerB, long type, Record[] children, OutputStream out) throws IOException Write out our header, and our children.- Parameters:
headerA
- the first byte of the headerheaderB
- the second byte of the headertype
- the record typechildren
- our child recordsout
- the stream to write to- Throws:
IOException
-
handleParentAwareRecords
Find the records that are parent-aware, and tell them who their parent is
-