FileDocCategorySizeDatePackage
DrawingRecord.javaAPI DocApache Poi 3.0.12852Mon Jan 01 12:39:40 GMT 2007org.apache.poi.hssf.record

DrawingRecord

public class DrawingRecord extends Record

Fields Summary
public static final short
sid
private byte[]
recordData
Constructors Summary
public DrawingRecord()


     
    
    
public DrawingRecord(RecordInputStream in)

        super( in );
    
Methods Summary
protected voidfillFields(org.apache.poi.hssf.record.RecordInputStream in)

      recordData = in.readRemainder();
    
public byte[]getData()

        return recordData;
    
public intgetRecordSize()

        int retval = 4;

        if (recordData != null)
        {
            retval += recordData.length;
        }
        return retval;
    
public shortgetSid()

        return sid;
    
public voidprocessContinueRecord(byte[] record)

        byte[] newBuffer = new byte[ recordData.length + record.length ];
        System.arraycopy( recordData, 0, newBuffer, 0, recordData.length );
        System.arraycopy( record, 0, newBuffer, recordData.length, record.length);
        recordData = newBuffer;
    
public intserialize(int offset, byte[] data)

        if (recordData == null)
        {
            recordData = new byte[ 0 ];
        }
        LittleEndian.putShort(data, 0 + offset, sid);
        LittleEndian.putShort(data, 2 + offset, ( short ) (recordData.length));
        if (recordData.length > 0)
        {
            System.arraycopy(recordData, 0, data, 4 + offset, recordData.length);
        }
        return getRecordSize();
    
public voidsetData(byte[] thedata)

        this.recordData = thedata;
    
protected voidvalidateSid(short id)
Checks the sid matches the expected side for this record

param
id the expected sid.

        if (id != sid)
        {
            throw new RecordFormatException("Not a MSODRAWING record");
        }