Methods Summary |
---|
public java.lang.Object | clone()
UnitsRecord rec = new UnitsRecord();
rec.field_1_units = field_1_units;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_units = in.readShort();
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 2;
|
public short | getSid()
return sid;
|
public short | getUnits()Get the units field for the Units record.
return field_1_units;
|
public int | serialize(int offset, byte[] data)
int pos = 0;
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));
LittleEndian.putShort(data, 4 + offset + pos, field_1_units);
return getRecordSize();
|
public void | setUnits(short field_1_units)Set the units field for the Units record.
this.field_1_units = field_1_units;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[UNITS]\n");
buffer.append(" .units = ")
.append("0x").append(HexDump.toHex( getUnits ()))
.append(" (").append( getUnits() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append("[/UNITS]\n");
return buffer.toString();
|
protected void | validateSid(short id)Checks the sid matches the expected side for this record
if (id != sid)
{
throw new RecordFormatException("Not a Units record");
}
|