Save This Page
Home » poi-src-3.2-FINAL-20081019 » org.apache » poi » ddf » [javadoc | source]
org.apache.poi.ddf
abstract public class: EscherRecord [javadoc | source]
java.lang.Object
   org.apache.poi.ddf.EscherRecord

Direct Known Subclasses:
    EscherContainerRecord, EscherMetafileBlip, EscherBlipWMFRecord, EscherBlipRecord, EscherClientAnchorRecord, EscherBitmapBlip, EscherOptRecord, EscherSpgrRecord, EscherChildAnchorRecord, EscherSpRecord, EscherPictBlip, EscherSplitMenuColorsRecord, UnknownEscherRecord, EscherClientDataRecord, EscherDgRecord, EscherBSERecord, EscherDggRecord, EscherTextboxRecord

The base abstract record from which all escher records are defined. Subclasses will need to define methods for serialization/deserialization and for determining the record size.
Nested Class Summary:
static class  EscherRecord.EscherRecordHeader  This class reads the standard escher header. 
Constructor:
 public EscherRecord() 
Method from org.apache.poi.ddf.EscherRecord Summary:
clone,   display,   fillFields,   fillFields,   getChild,   getChildRecords,   getInstance,   getOptions,   getRecordId,   getRecordName,   getRecordSize,   isContainerRecord,   readHeader,   serialize,   serialize,   serialize,   setChildRecords,   setOptions,   setRecordId
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.poi.ddf.EscherRecord Detail:
 public Object clone() 
    Escher records may need to be clonable in the future.
 public  void display(PrintWriter w,
    int indent) 
    The display methods allows escher variables to print the record names according to their hierarchy.
 protected int fillFields(byte[] data,
    EscherRecordFactory f) 
    Delegates to fillFields(byte[], int, EscherRecordFactory)
 abstract public int fillFields(byte[] data,
    int offset,
    EscherRecordFactory recordFactory)
    The contract of this method is to deserialize an escher record including it's children.
 public EscherRecord getChild(int index) 
    Returns the indexed child record.
 public List getChildRecords() 
 public short getInstance() 
    Returns the instance part of the option record.
 public short getOptions() 
 public short getRecordId() 
    Return the current record id.
 abstract public String getRecordName()
    Subclasses should return the short name for this escher record.
 abstract public int getRecordSize()
    Subclasses should effeciently return the number of bytes required to serialize the record.
 public boolean isContainerRecord() 
    Determine whether this is a container record by inspecting the option field.
 protected int readHeader(byte[] data,
    int offset) 
    Reads the 8 byte header information and populates the options and recordId records.
 public byte[] serialize() 
    Serializes to a new byte array. This is done by delegating to serialize(int, byte[]);
 public int serialize(int offset,
    byte[] data) 
    Serializes to an existing byte array without serialization listener. This is done by delegating to serialize(int, byte[], EscherSerializationListener).
 abstract public int serialize(int offset,
    byte[] data,
    EscherSerializationListener listener)
    Serializes the record to an existing byte array.
 public  void setChildRecords(List childRecords) 
    Sets the child records for this record. By default this will throw an exception as only EscherContainerRecords may have children.
 public  void setOptions(short options) 
    Set the options this this record. Container records should have the last nibble set to 0xF.
 public  void setRecordId(short recordId) 
    Sets the record id for this record.