Methods Summary |
---|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)called by the constructor, should set class level fields. Should throw
runtime exception for bad/icomplete data.
//For now We use it only for one case
//When we need to add an named range when no named ranges was
//before it
field_1_number_of_sheets = in.readShort();
field_2_flag = in.readShort();
|
public short | getFlag()
return field_2_flag;
|
public short | getNumberOfSheets()
return field_1_number_of_sheets;
|
public int | getRecordSize()
return 4 + 4;
|
public short | getSid()
return sid;
|
public int | serialize(int offset, byte[] data)called by the class that is responsible for writing this sucker.
Subclasses should implement this so that their data is passed back in a
byte array.
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, (short) 4);
LittleEndian.putShort(data, 4 + offset, field_1_number_of_sheets);
LittleEndian.putShort(data, 6 + offset, field_2_flag);
return getRecordSize();
|
public void | setFlag(short flag)
field_2_flag = flag;
|
public void | setNumberOfSheets(short number)
field_1_number_of_sheets = number;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[SUPBOOK]\n");
buffer.append("numberosheets = ").append(getNumberOfSheets()).append('\n");
buffer.append("flag = ").append(getFlag()).append('\n");
buffer.append("[/SUPBOOK]\n");
return buffer.toString();
|
protected void | validateSid(short id)
if (id != sid)
{
throw new RecordFormatException("NOT An Supbook RECORD");
}
|