Fields Summary |
---|
public static final short | sidfor BIFF8 files the BOF is 0x809. For earlier versions it was 0x09 or 0x(biffversion)09 |
private short | field_1_version |
private short | field_2_type |
private short | field_3_build |
private short | field_4_year |
private int | field_5_history |
private int | field_6_rversion |
public static final short | VERSIONsuggested default (0x06 - BIFF8) |
public static final short | BUILDsuggested default 0x10d3 |
public static final short | BUILD_YEARsuggested default 0x07CC (1996) |
public static final short | HISTORY_MASKsuggested default for a normal sheet (0x41) |
public static final short | TYPE_WORKBOOK |
public static final short | TYPE_VB_MODULE |
public static final short | TYPE_WORKSHEET |
public static final short | TYPE_CHART |
public static final short | TYPE_EXCEL_4_MACRO |
public static final short | TYPE_WORKSPACE_FILE |
Methods Summary |
---|
public java.lang.Object | clone()
BOFRecord rec = new BOFRecord();
rec.field_1_version = field_1_version;
rec.field_2_type = field_2_type;
rec.field_3_build = field_3_build;
rec.field_4_year = field_4_year;
rec.field_5_history = field_5_history;
rec.field_6_rversion = field_6_rversion;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_version = in.readShort();
field_2_type = in.readShort();
field_3_build = in.readShort();
field_4_year = in.readShort();
field_5_history = in.readInt();
field_6_rversion = in.readInt();
|
public short | getBuild()get the build that wrote this file
return field_3_build;
|
public short | getBuildYear()Year of the build that wrote this file
return field_4_year;
|
public int | getHistoryBitMask()get the history bit mask (not very useful)
return field_5_history;
|
public int | getRecordSize()
return 20;
|
public int | getRequiredVersion()get the minimum version required to read this file
return field_6_rversion;
|
public short | getSid()
return sid;
|
public short | getType()type of object this marks
return field_2_type;
|
public short | getVersion()Version number - for BIFF8 should be 0x06
return field_1_version;
|
public int | serialize(int offset, byte[] data)
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset,
(( short ) 0x10)); // 16 byte length
LittleEndian.putShort(data, 4 + offset, getVersion());
LittleEndian.putShort(data, 6 + offset, getType());
LittleEndian.putShort(data, 8 + offset, getBuild());
LittleEndian.putShort(data, 10 + offset, getBuildYear());
LittleEndian.putInt(data, 12 + offset, getHistoryBitMask());
LittleEndian.putInt(data, 16 + offset, getRequiredVersion());
return getRecordSize();
|
public void | setBuild(short build)build that wrote this file
field_3_build = build;
|
public void | setBuildYear(short year)Year of the build that wrote this file
field_4_year = year;
|
public void | setHistoryBitMask(int bitmask)set the history bit mask (not very useful)
field_5_history = bitmask;
|
public void | setRequiredVersion(int version)set the minimum version required to read this file
field_6_rversion = version;
|
public void | setType(short type)type of object this marks
field_2_type = type;
|
public void | setVersion(short version)Version number - for BIFF8 should be 0x06
field_1_version = version;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[BOF RECORD]\n");
buffer.append(" .version = ")
.append(Integer.toHexString(getVersion())).append("\n");
buffer.append(" .type = ")
.append(Integer.toHexString(getType())).append("\n");
buffer.append(" .build = ")
.append(Integer.toHexString(getBuild())).append("\n");
buffer.append(" .buildyear = ").append(getBuildYear())
.append("\n");
buffer.append(" .history = ")
.append(Integer.toHexString(getHistoryBitMask())).append("\n");
buffer.append(" .requiredversion = ")
.append(Integer.toHexString(getRequiredVersion())).append("\n");
buffer.append("[/BOF RECORD]\n");
return buffer.toString();
|
protected void | validateSid(short id)
if (id != sid)
{
throw new RecordFormatException("NOT A BOF RECORD");
}
|