| Method from org.apache.cocoon.poi.hssf.record.MulBlankRecord Detail: |
protected void fillFields(byte[] data,
short size,
int offset) {
field_1_row = LittleEndian.getShort(data, 0 + offset);
field_2_first_col = LittleEndian.getShort(data, 2 + offset);
field_3_xfs = parseXFs(data, 4, offset, size);
field_4_last_col = LittleEndian.getShort(data,
(field_3_xfs.length * 2)
+ 4 + offset);
}
called by the constructor, should set class level fields. Should throw
runtime exception for bad/icomplete data. |
public short getFirstColumn() {
return field_2_first_col;
}
starting column (first cell this holds in the row) |
public short getLastColumn() {
return field_4_last_col;
}
ending column (last cell this holds in the row) |
public int getNumColumns() {
return field_4_last_col - field_2_first_col + 1;
}
get the number of columns this contains (last-first +1) |
public short getRow() {
return field_1_row;
}
get the row number of the cells this represents |
public short getSid() {
return this.sid;
}
|
public short getXFAt(int coffset) {
return field_3_xfs[ coffset ];
}
returns the xf index for column (coffset = column - field_2_first_col) |
public byte[] serialize() {
return null; // read only in this release
}
|
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[MULBLANK]\n");
buffer.append("firstcol = ")
.append(Integer.toHexString(getFirstColumn())).append("\n");
buffer.append(" lastcol = ")
.append(Integer.toHexString(getLastColumn())).append("\n");
for (int k = 0; k < getNumColumns(); k++)
{
buffer.append("xf").append(k).append(" = ")
.append(Integer.toHexString(getXFAt(k))).append("\n");
}
buffer.append("[/MULBLANK]\n");
return buffer.toString();
}
|
protected void validateSid(short id) {
if (id != sid)
{
throw new RecordFormatException("Not a MulBlankRecord!");
}
}
called by constructor, should throw runtime exception in the event of a
record passed with a differing ID. |