Methods Summary |
---|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_tabids = new short[ in.remaining() / 2 ];
for (int k = 0; k < field_1_tabids.length; k++)
{
field_1_tabids[ k ] = in.readShort();
}
|
public int | getRecordSize()
return 4 + (getTabIdArray().length * 2);
|
public short | getSid()
return sid;
|
public short[] | getTabIdArray()get the tab array. (0,1,2).
return field_1_tabids;
|
public int | serialize(int offset, byte[] data)
short[] tabids = getTabIdArray();
short length = ( short ) (tabids.length * 2);
int byteoffset = 4;
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset,
(( short ) length)); // nubmer tabids *
// 2 (num bytes in a short)
for (int k = 0; k < (length / 2); k++)
{
LittleEndian.putShort(data, byteoffset + offset, tabids[ k ]);
byteoffset += 2;
}
return getRecordSize();
|
public void | setTabIdArray(short[] array)set the tab array. (0,1,2).
field_1_tabids = array;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[TABID]\n");
buffer.append(" .elements = ").append(field_1_tabids.length)
.append("\n");
for (int k = 0; k < field_1_tabids.length; k++)
{
buffer.append(" .element_" + k + " = ")
.append(field_1_tabids[ k ]).append("\n");
}
buffer.append("[/TABID]\n");
return buffer.toString();
|
protected void | validateSid(short id)
if (id != sid)
{
throw new RecordFormatException("NOT A TABID RECORD");
}
|