org.apache.poi.hslf.record
Class RecordContainer

java.lang.Object
  extended by org.apache.poi.hslf.record.Record
      extended by org.apache.poi.hslf.record.RecordContainer
Direct Known Subclasses:
Comment2000, DummyRecordWithChildren, EscherTextboxWrapper, ExEmbed, ExHyperlink, ExObjList, FontCollection, InteractiveInfo, PositionDependentRecordContainer, SlideListWithText, Sound, SoundCollection

public abstract class RecordContainer
extends Record

Abstract class which all container records will extend. Providers helpful methods for writing child records out to disk

Author:
Nick Burch

Field Summary
protected  Record[] _children
           
 
Fields inherited from class org.apache.poi.hslf.record.Record
logger
 
Constructor Summary
RecordContainer()
           
 
Method Summary
 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[] getChildRecords()
          Return any children
 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
 void writeOut(byte headerA, byte headerB, long type, Record[] children, java.io.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_children

protected Record[] _children
Constructor Detail

RecordContainer

public RecordContainer()
Method Detail

getChildRecords

public Record[] getChildRecords()
Return any children

Specified by:
getChildRecords in class Record

isAnAtom

public boolean isAnAtom()
We're not an atom

Specified by:
isAnAtom in class Record

appendChildRecord

public void appendChildRecord(Record newChild)
Add a new child record onto a record's list of children.


addChildAfter

public void addChildAfter(Record newChild,
                          Record after)
Adds the given Child Record after the supplied record

Parameters:
newChild -
after -

addChildBefore

public void addChildBefore(Record newChild,
                           Record before)
Adds the given Child Record before the supplied record

Parameters:
newChild -
before -

moveChildBefore

public void moveChildBefore(Record child,
                            Record before)
Moves the given Child Record to before the supplied record


moveChildrenBefore

public void moveChildrenBefore(Record firstChild,
                               int number,
                               Record before)
Moves the given Child Records to before the supplied record


moveChildrenAfter

public void moveChildrenAfter(Record firstChild,
                              int number,
                              Record after)
Moves the given Child Records to after the supplied record


writeOut

public void writeOut(byte headerA,
                     byte headerB,
                     long type,
                     Record[] children,
                     java.io.OutputStream out)
              throws java.io.IOException
Write out our header, and our children.

Parameters:
headerA - the first byte of the header
headerB - the second byte of the header
type - the record type
children - our child records
out - the stream to write to
Throws:
java.io.IOException


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.