Methods Summary |
---|
public java.lang.Object | clone()Escher records may need to be clonable in the future.
throw new RuntimeException( "The class " + getClass().getName() + " needs to define a clone method" );
|
public void | display(java.io.PrintWriter w, int indent)The display methods allows escher variables to print the record names
according to their hierarchy.
for (int i = 0; i < indent * 4; i++) w.print(' ");
w.println(getRecordName());
|
protected int | fillFields(byte[] data, org.apache.poi.ddf.EscherRecordFactory f)Delegates to fillFields(byte[], int, EscherRecordFactory)
return fillFields( data, 0, f );
|
public abstract int | fillFields(byte[] data, int offset, org.apache.poi.ddf.EscherRecordFactory recordFactory)The contract of this method is to deserialize an escher record including
it's children.
|
public org.apache.poi.ddf.EscherRecord | getChild(int index)Returns the indexed child record.
return (EscherRecord) getChildRecords().get(index);
|
public java.util.List | getChildRecords() return Collections.EMPTY_LIST;
|
public short | getInstance()Returns the instance part of the option record.
return (short) ( options >> 4 );
|
public short | getOptions()
return options;
|
public short | getRecordId()Return the current record id.
return recordId;
|
public abstract java.lang.String | getRecordName()Subclasses should return the short name for this escher record.
|
public abstract 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.
return (options & (short)0x000f) == (short)0x000f;
|
protected int | readHeader(byte[] data, int offset)Reads the 8 byte header information and populates the options
and recordId records.
EscherRecordHeader header = EscherRecordHeader.readHeader(data, offset);
options = header.getOptions();
recordId = header.getRecordId();
return header.getRemainingBytes();
|
public abstract int | serialize(int offset, byte[] data, org.apache.poi.ddf.EscherSerializationListener listener)Serializes the record to an existing byte array.
|
public byte[] | serialize()Serializes to a new byte array. This is done by delegating to
serialize(int, byte[]);
byte[] retval = new byte[getRecordSize()];
serialize( 0, retval );
return retval;
|
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).
return serialize( offset, data, new NullEscherSerializationListener() );
|
public void | setChildRecords(java.util.List childRecords)Sets the child records for this record. By default this will throw
an exception as only EscherContainerRecords may have children. throw new IllegalArgumentException("This record does not support child records.");
|
public void | setOptions(short options)Set the options this this record. Container records should have the
last nibble set to 0xF.
this.options = options;
|
public void | setRecordId(short recordId)Sets the record id for this record.
this.recordId = recordId;
|