Methods Summary |
---|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)Read the record data from the supplied RecordInputStream
field_1_row = in.readShort();
field_2_col = in.readShort();
field_3_flags = in.readShort();
field_4_shapeid = in.readShort();
int length = in.readShort();
byte[] bytes = in.readRemainder();
field_5_author = new String(bytes, 1, length);
|
public java.lang.String | getAuthor()Name of the original comment author
return field_5_author;
|
public short | getColumn()Return the column that contains the comment
return field_2_col;
|
public short | getFlags()Options flags.
return field_3_flags;
|
public int | getRecordSize()Size of record
int retval = 4 + 2 + 2 + 2 + 2 + 2 + 1 + field_5_author.length() + 1;
return retval;
|
public short | getRow()Return the row that contains the comment
return field_1_row;
|
public short | getShapeId()Object id for OBJ record that contains the comment
return field_4_shapeid;
|
public short | getSid()
return sid;
|
public int | serialize(int offset, byte[] data)Serialize the record data into the supplied array of bytes
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));
LittleEndian.putShort(data, 4 + offset , field_1_row);
LittleEndian.putShort(data, 6 + offset , field_2_col);
LittleEndian.putShort(data, 8 + offset , field_3_flags);
LittleEndian.putShort(data, 10 + offset , field_4_shapeid);
LittleEndian.putShort(data, 12 + offset , (short)field_5_author.length());
byte[] str = field_5_author.getBytes();
System.arraycopy(str, 0, data, 15 + offset, str.length);
return getRecordSize();
|
public void | setAuthor(java.lang.String author)Name of the original comment author
field_5_author = author;
|
public void | setColumn(short col)Specify the column that contains the comment
field_2_col = col;
|
public void | setFlags(short flags)Options flag
field_3_flags = flags;
|
public void | setRow(short row)Specify the row that contains the comment
field_1_row = row;
|
public void | setShapeId(short id)Object id for OBJ record that contains the comment
field_4_shapeid = id;
|
public java.lang.String | toString()Convert this record to string.
Used by BiffViewer and other utulities.
StringBuffer buffer = new StringBuffer();
buffer.append("[NOTE]\n");
buffer.append(" .recordid = 0x" + Integer.toHexString( getSid() ) + ", size = " + getRecordSize() + "\n");
buffer.append(" .row = " + field_1_row + "\n");
buffer.append(" .col = " + field_2_col + "\n");
buffer.append(" .flags = " + field_3_flags + "\n");
buffer.append(" .shapeid = " + field_4_shapeid + "\n");
buffer.append(" .author = " + field_5_author + "\n");
buffer.append("[/NOTE]\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 NoteRecord record");
}
|