BlockWritable, HeaderBlockConstantspublic class HeaderBlockWriter extends java.lang.Object implements HeaderBlockConstants, BlockWritable
_bat_array_offset, _bat_count_offset, _max_bats_in_header, _property_start_offset, _sbat_block_count_offset, _sbat_start_offset, _signature, _signature_offset, _xbat_count_offset, _xbat_start_offset| Constructor | Description |
|---|---|
HeaderBlockWriter(POIFSBigBlockSize bigBlockSize) |
Create a single instance initialized with default values
|
HeaderBlockWriter(HeaderBlock headerBlock) |
Create a single instance initialized with the specified
existing values
|
| Modifier and Type | Method | Description |
|---|---|---|
BATBlock[] |
setBATBlocks(int blockCount,
int startBlock) |
Set BAT block parameters.
|
void |
setPropertyStart(int startBlock) |
Set start of Property Table
|
void |
setSBATBlockCount(int count) |
Set count of SBAT blocks
|
void |
setSBATStart(int startBlock) |
Set start of small block allocation table
|
void |
writeBlock(java.nio.ByteBuffer block) |
Write the block's data to an existing block
|
void |
writeBlocks(java.io.OutputStream stream) |
Write the block's data to an OutputStream
|
public HeaderBlockWriter(POIFSBigBlockSize bigBlockSize)
public HeaderBlockWriter(HeaderBlock headerBlock)
public BATBlock[] setBATBlocks(int blockCount, int startBlock)
blockCount - count of BAT blocksstartBlock - index of first BAT blockpublic void setPropertyStart(int startBlock)
startBlock - the index of the first block of the Property
Tablepublic void setSBATStart(int startBlock)
startBlock - the index of the first big block of the small
block allocation tablepublic void setSBATBlockCount(int count)
count - the number of SBAT blockspublic void writeBlocks(java.io.OutputStream stream)
throws java.io.IOException
writeBlocks in interface BlockWritablestream - the OutputStream to which the stored data should
be writtenjava.io.IOException - on problems writing to the specified
streampublic void writeBlock(java.nio.ByteBuffer block)
throws java.io.IOException
block - the ByteBuffer of the block to which the
stored data should be writtenjava.io.IOException - on problems writing to the blockCopyright 2018 The Apache Software Foundation or its licensors, as applicable.