| Method from org.apache.cocoon.poi.hssf.record.LabelRecord Detail: |
protected void fillFields(byte[] data,
short size,
int offset) {
field_1_row = LittleEndian.getShort(data, 0 + offset);
field_2_column = LittleEndian.getShort(data, 2 + offset);
field_3_xf_index = LittleEndian.getShort(data, 4 + offset);
field_4_string_len = LittleEndian.getShort(data, 6 + offset);
field_5_unicode_flag = data[ 8 + offset ];
if (isUnCompressedUnicode())
{
field_6_value = StringUtil.getFromUnicode(data, 8 + offset,
field_4_string_len);
}
else
{
field_6_value = new String(data, 9 + offset, getStringLength());
}
}
called by the constructor, should set class level fields. Should throw
runtime exception for bad/icomplete data. |
public short getColumn() {
return field_2_column;
}
|
public short getRow() {
return field_1_row;
}
|
public short getSid() {
return this.sid;
}
|
public short getStringLength() {
return field_4_string_len;
}
get the number of characters this string contains |
public String getValue() {
return field_6_value;
}
|
public short getXFIndex() {
return field_3_xf_index;
}
|
public boolean isAfter(CellValueRecordInterface i) {
if (this.getRow() < i.getRow())
{
return false;
}
if ((this.getRow() == i.getRow())
&& (this.getColumn() < i.getColumn()))
{
return false;
}
if ((this.getRow() == i.getRow())
&& (this.getColumn() == i.getColumn()))
{
return false;
}
return true;
}
|
public boolean isBefore(CellValueRecordInterface i) {
if (this.getRow() > i.getRow())
{
return false;
}
if ((this.getRow() == i.getRow())
&& (this.getColumn() > i.getColumn()))
{
return false;
}
if ((this.getRow() == i.getRow())
&& (this.getColumn() == i.getColumn()))
{
return false;
}
return true;
}
|
public boolean isEqual(CellValueRecordInterface i) {
return ((this.getRow() == i.getRow())
&& (this.getColumn() == i.getColumn()));
}
|
public boolean isInValueSection() {
return true;
}
|
public boolean isUnCompressedUnicode() {
return (field_5_unicode_flag == 1);
}
is this uncompressed unicode (16bit)? Or just 8-bit compressed? |
public boolean isValue() {
return true;
}
|
public byte[] serialize() {
throw new RecordFormatException(
"Label Records are supported READ ONLY...convert to LabelSST");
}
THROWS A RUNTIME EXCEPTION.. USE LABELSSTRecords. YOU HAVE NO REASON to use LABELRecord!! |
public void setColumn(short col) {
}
|
public void setRow(short row) {
}
|
public void setXFIndex(short xf) {
}
|
protected void validateSid(short id) {
if (id != this.sid)
{
throw new RecordFormatException("Not a valid LabelRecord");
}
}
called by constructor, should throw runtime exception in the event of a
record passed with a differing ID. |