| Method from org.apache.cocoon.poi.hssf.record.BoundSheetRecord Detail: |
protected void fillFields(byte[] data,
short size,
int offset) {
field_1_position_of_BOF = LittleEndian.getInt(data,
0 + offset);
field_2_option_flags = LittleEndian.getShort(data,
4 + offset);
field_3_sheetname_length = data[ 6 + offset ];
field_4_compressed_unicode_flag = data[ 7 + offset ];
field_5_sheetname = new String(data, 8 + offset,
( int ) field_3_sheetname_length);
}
|
public byte getCompressedUnicodeFlag() {
return field_4_compressed_unicode_flag;
}
get whether or not to interperate the Sheetname as compressed unicode (8/16 bit)
(This is undocumented but can be found as Q187919 on the Microsoft(tm) Support site) |
public short getOptionFlags() {
return field_2_option_flags;
}
get the option flags (unimportant for HSSF supported sheets) |
public int getPositionOfBof() {
return field_1_position_of_BOF;
}
get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file |
public String getSheetname() {
return field_5_sheetname;
}
get the sheetname for this sheet. (this appears in the tabs at the bottom) |
public byte getSheetnameLength() {
return field_3_sheetname_length;
}
get the length of the sheetname in characters |
public short getSid() {
return this.sid;
}
|
public byte[] serialize() {
byte[] retval = new byte[ 12 + getSheetnameLength() ];
LittleEndian.putShort(retval, 0, sid);
LittleEndian.putShort(retval, 2,
( short ) (0x08 + getSheetnameLength()));
LittleEndian.putInt(retval, 4, getPositionOfBof());
LittleEndian.putShort(retval, 8, getOptionFlags());
retval[ 10 ] = getSheetnameLength();
retval[ 11 ] = getCompressedUnicodeFlag();
// we assume compressed unicode (bein the dern americans we are ;-p)
StringUtil.putCompressedUnicode(getSheetname(), retval, 12);
return retval;
}
|
public void setCompressedUnicodeFlag(byte flag) {
field_4_compressed_unicode_flag = flag;
}
set whether or not to interperate the Sheetname as compressed unicode (8/16 bit)
(This is undocumented but can be found as Q187919 on the Microsoft(tm) Support site) |
public void setOptionFlags(short flags) {
field_2_option_flags = flags;
}
set the option flags (unimportant for HSSF supported sheets) |
public void setPositionOfBof(int pos) {
field_1_position_of_BOF = pos;
}
set the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file |
public void setSheetname(String sheetname) {
field_5_sheetname = sheetname;
}
Set the sheetname for this sheet. (this appears in the tabs at the bottom) |
public void setSheetnameLength(byte len) {
field_3_sheetname_length = len;
}
Set the length of the sheetname in characters |
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[BOUNDSHEET]\n");
buffer.append(" .bof = ")
.append(Integer.toHexString(getPositionOfBof())).append("\n");
buffer.append(" .optionflags = ")
.append(Integer.toHexString(getOptionFlags())).append("\n");
buffer.append(" .sheetname length= ")
.append(Integer.toHexString(getSheetnameLength())).append("\n");
buffer.append(" .unicodeflag = ")
.append(Integer.toHexString(getCompressedUnicodeFlag()))
.append("\n");
buffer.append(" .sheetname = ").append(getSheetname())
.append("\n");
buffer.append("[/BOUNDSHEET]\n");
return buffer.toString();
}
|
protected void validateSid(short id) {
if (id != sid)
{
throw new RecordFormatException("NOT A Bound Sheet RECORD");
}
}
|