EscherClientDataRecordpublic class EscherClientDataRecord extends EscherRecord The EscherClientDataRecord is used to store client specific data about the position of a
shape within a container. |
Fields Summary |
---|
public static final short | RECORD_ID | public static final String | RECORD_DESCRIPTION | private byte[] | remainingData |
Methods Summary |
---|
public int | fillFields(byte[] data, int offset, org.apache.poi.ddf.EscherRecordFactory recordFactory)This method deserializes the record from a byte array.
int bytesRemaining = readHeader( data, offset );
int pos = offset + 8;
remainingData = new byte[bytesRemaining];
System.arraycopy( data, pos, remainingData, 0, bytesRemaining );
return 8 + bytesRemaining;
| public short | getRecordId()Returns the identifier of this record.
return RECORD_ID;
| public java.lang.String | getRecordName()The short name for this record
return "ClientData";
| public int | getRecordSize()Returns the number of bytes that are required to serialize this record.
return 8 + (remainingData == null ? 0 : remainingData.length);
| public byte[] | getRemainingData()Any data recording this record.
return remainingData;
| public int | serialize(int offset, byte[] data, org.apache.poi.ddf.EscherSerializationListener listener)This method serializes this escher record into a byte array.
listener.beforeRecordSerialize( offset, getRecordId(), this );
if (remainingData == null) remainingData = new byte[0];
LittleEndian.putShort( data, offset, getOptions() );
LittleEndian.putShort( data, offset + 2, getRecordId() );
LittleEndian.putInt( data, offset + 4, remainingData.length );
System.arraycopy( remainingData, 0, data, offset + 8, remainingData.length );
int pos = offset + 8 + remainingData.length;
listener.afterRecordSerialize( pos, getRecordId(), pos - offset, this );
return pos - offset;
| public void | setRemainingData(byte[] remainingData)Any data recording this record.
this.remainingData = remainingData;
| public java.lang.String | toString()Returns the string representation of this record.
String nl = System.getProperty("line.separator");
String extraData;
ByteArrayOutputStream b = new ByteArrayOutputStream();
try
{
HexDump.dump(this.remainingData, 0, b, 0);
extraData = b.toString();
}
catch ( Exception e )
{
extraData = "error\n";
}
return getClass().getName() + ":" + nl +
" RecordId: 0x" + HexDump.toHex(RECORD_ID) + nl +
" Options: 0x" + HexDump.toHex(getOptions()) + nl +
" Extra Data:" + nl +
extraData;
|
|