Top Description Fields Constructors Methods
org.apache.poi.hssf.record

public final Class BOFRecord

extends StandardRecord
Class Inheritance
Imports
java.util.Collections, .LinkedHashMap, .Map, java.util.function.Supplier, org.apache.poi.util.LittleEndianOutput

Somewhat of a misnomer, its used for the beginning of a set of records that have a particular purpose or subject. Used in sheets and workbooks.

Field Summary

Modifier and TypeField and Description
public static final short
public static final short
public static final short
public static final short
public static final int
BUILD

suggested default 0x10d3

public static final int
BUILD_YEAR

suggested default 0x07CC (1996)

private int
private int
private int
private int
private int
private int
public static final int
HISTORY_MASK

suggested default for a normal sheet (0x41)

public static final short
sid

for BIFF8 files the BOF is 0x809.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
VERSION

suggested default (0x0600 - BIFF8)

Constructor Summary

AccessConstructor and Description
public
BOFRecord()

Constructs an empty BOFRecord with no fields set.

public
private
BOFRecord(int type)

public

Method Summary

Modifier and TypeMethod and Description
public BOFRecord
public static BOFRecord
public int

Returns:

short build number of the generator of this file
getBuild
()

get the build that wrote this file

public int

Returns:

short build year of the generator of this file
getBuildYear
()

Year of the build that wrote this file

protected int
public Map<String, Supplier<?>>
public HSSFRecordTypes
public int

Returns:

int bitmask showing the history of the file (who cares!)
getHistoryBitMask
()

get the history bit mask (not very useful)

public int

Returns:

int least version that can read the file
getRequiredVersion
()

get the minimum version required to read this file

public short
getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

public int

Returns:

type of object
getType
()

type of object this marks

private String
public int

Returns:

version number of the generator of this file
getVersion
()

Version number - for BIFF8 should be 0x06

public void
serialize(LittleEndianOutput
the output object
out
)

Implements abstract org.apache.poi.hssf.record.StandardRecord.serialize.

Write the data content of this BIFF record.

public void
setBuild(int
build number to set
build
)

build that wrote this file

public void
setBuildYear(int
build year to set
year
)

Year of the build that wrote this file

public void
setHistoryBitMask(int
bitmask to set for the history
bitmask
)

set the history bit mask (not very useful)

public void
setRequiredVersion(int
version to set
version
)

set the minimum version required to read this file

public void
setType(int
type to be set
type
)

type of object this marks

public void
setVersion(int
version to be set
version
)

Version number - for BIFF8 should be 0x06

Inherited from org.apache.poi.hssf.record.StandardRecord:
getRecordSizeserialize

Field Detail

biff2_sidback to summary
public static final short biff2_sid
biff3_sidback to summary
public static final short biff3_sid
biff4_sidback to summary
public static final short biff4_sid
biff5_sidback to summary
public static final short biff5_sid
BUILDback to summary
public static final int BUILD

suggested default 0x10d3

BUILD_YEARback to summary
public static final int BUILD_YEAR

suggested default 0x07CC (1996)

field_1_versionback to summary
private int field_1_version
field_2_typeback to summary
private int field_2_type
field_3_buildback to summary
private int field_3_build
field_4_yearback to summary
private int field_4_year
field_5_historyback to summary
private int field_5_history
field_6_rversionback to summary
private int field_6_rversion
HISTORY_MASKback to summary
public static final int HISTORY_MASK

suggested default for a normal sheet (0x41)

sidback to summary
public static final short sid

for BIFF8 files the BOF is 0x809. For earlier versions see biff2_sid biff3_sid biff4_sid biff5_sid

TYPE_CHARTback to summary
public static final int TYPE_CHART
TYPE_EXCEL_4_MACROback to summary
public static final int TYPE_EXCEL_4_MACRO
TYPE_VB_MODULEback to summary
public static final int TYPE_VB_MODULE
TYPE_WORKBOOKback to summary
public static final int TYPE_WORKBOOK
TYPE_WORKSHEETback to summary
public static final int TYPE_WORKSHEET
TYPE_WORKSPACE_FILEback to summary
public static final int TYPE_WORKSPACE_FILE
VERSIONback to summary
public static final int VERSION

suggested default (0x0600 - BIFF8)

Constructor Detail

BOFRecordback to summary
public BOFRecord()

Constructs an empty BOFRecord with no fields set.

BOFRecordback to summary
public BOFRecord(BOFRecord other)
BOFRecordback to summary
private BOFRecord(int type)
BOFRecordback to summary
public BOFRecord(RecordInputStream in)

Method Detail

copyback to summary
public BOFRecord copy()

Implements abstract org.apache.poi.hssf.record.StandardRecord.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:BOFRecord

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
createSheetBOFback to summary
public static BOFRecord createSheetBOF()
getBuildback to summary
public int getBuild()

get the build that wrote this file

Returns:int

short build number of the generator of this file

See Also
BUILD
getBuildYearback to summary
public int getBuildYear()

Year of the build that wrote this file

Returns:int

short build year of the generator of this file

See Also
BUILD_YEAR
getDataSizeback to summary
protected int getDataSize()

Implements abstract org.apache.poi.hssf.record.StandardRecord.getDataSize.

getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getGenericRecordTypeback to summary
public HSSFRecordTypes getGenericRecordType()

Overrides default org.apache.poi.common.usermodel.GenericRecord.getGenericRecordType.

Implements abstract org.apache.poi.hssf.record.Record.getGenericRecordType.

Annotations
@Override
getHistoryBitMaskback to summary
public int getHistoryBitMask()

get the history bit mask (not very useful)

Returns:int

int bitmask showing the history of the file (who cares!)

See Also
HISTORY_MASK
getRequiredVersionback to summary
public int getRequiredVersion()

get the minimum version required to read this file

Returns:int

int least version that can read the file

See Also
VERSION
getSidback to summary
public short getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

Doc from org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

Returns:short

he id for this record

getTypeback to summary
public int getType()

type of object this marks

Returns:int

type of object

See Also
TYPE_WORKBOOK, TYPE_VB_MODULE, TYPE_WORKSHEET, TYPE_CHART, TYPE_EXCEL_4_MACRO, TYPE_WORKSPACE_FILE
getTypeNameback to summary
private String getTypeName()
getVersionback to summary
public int getVersion()

Version number - for BIFF8 should be 0x06

Returns:int

version number of the generator of this file

See Also
VERSION
serializeback to summary
public void serialize(LittleEndianOutput out)

Implements abstract org.apache.poi.hssf.record.StandardRecord.serialize.

Doc from org.apache.poi.hssf.record.StandardRecord.serialize.

Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.

The number of bytes written must equal the record size reported by org.apache.poi.hssf.record.Record#getRecordSize()} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).

Parameters
out:LittleEndianOutput

the output object

setBuildback to summary
public void setBuild(int build)

build that wrote this file

Parameters
build:int

build number to set

See Also
BUILD
setBuildYearback to summary
public void setBuildYear(int year)

Year of the build that wrote this file

Parameters
year:int

build year to set

See Also
BUILD_YEAR
setHistoryBitMaskback to summary
public void setHistoryBitMask(int bitmask)

set the history bit mask (not very useful)

Parameters
bitmask:int

bitmask to set for the history

See Also
HISTORY_MASK
setRequiredVersionback to summary
public void setRequiredVersion(int version)

set the minimum version required to read this file

Parameters
version:int

version to set

See Also
VERSION
setTypeback to summary
public void setType(int type)

type of object this marks

Parameters
type:int

type to be set

See Also
TYPE_WORKBOOK, TYPE_VB_MODULE, TYPE_WORKSHEET, TYPE_CHART, TYPE_EXCEL_4_MACRO, TYPE_WORKSPACE_FILE
setVersionback to summary
public void setVersion(int version)

Version number - for BIFF8 should be 0x06

Parameters
version:int

version to be set

See Also
VERSION