Methods Summary |
---|
public java.lang.Object | clone()
SCLRecord rec = new SCLRecord();
rec.field_1_numerator = field_1_numerator;
rec.field_2_denominator = field_2_denominator;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_numerator = in.readShort();
field_2_denominator = in.readShort();
|
public short | getDenominator()Get the denominator field for the SCL record.
return field_2_denominator;
|
public short | getNumerator()Get the numerator field for the SCL record.
return field_1_numerator;
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 2 + 2;
|
public short | getSid()
return sid;
|
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_numerator);
LittleEndian.putShort(data, 6 + offset + pos, field_2_denominator);
return getRecordSize();
|
public void | setDenominator(short field_2_denominator)Set the denominator field for the SCL record.
this.field_2_denominator = field_2_denominator;
|
public void | setNumerator(short field_1_numerator)Set the numerator field for the SCL record.
this.field_1_numerator = field_1_numerator;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[SCL]\n");
buffer.append(" .numerator = ")
.append("0x").append(HexDump.toHex( getNumerator ()))
.append(" (").append( getNumerator() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .denominator = ")
.append("0x").append(HexDump.toHex( getDenominator ()))
.append(" (").append( getDenominator() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append("[/SCL]\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 SCL record");
}
|