public class HeaderBlockWriter extends BigBlock implements HeaderBlockConstants
Modifier and Type | Field and Description |
---|---|
private IntegerField |
_bat_count |
private byte[] |
_data |
private static byte |
_default_value |
private IntegerField |
_property_start |
private IntegerField |
_sbat_block_count |
private IntegerField |
_sbat_start |
private IntegerField |
_xbat_count |
private IntegerField |
_xbat_start |
private int |
bigBlockSize |
_bat_array_offset, _bat_count_offset, _property_start_offset, _sbat_block_count_offset, _sbat_start_offset, _signature, _signature_offset, _xbat_count_offset, _xbat_start_offset
Constructor and Description |
---|
HeaderBlockWriter(int blockSize)
Create a single instance initialized with default values
|
Modifier and Type | Method and Description |
---|---|
(package private) static int |
calculateXBATStorageRequirements(int blockCount,
int size)
For a given number of BAT blocks, calculate how many XBAT
blocks will be needed
|
int |
getBigBlockSize() |
BATBlock[] |
setBATBlocks(int blockCount,
int startBlock,
int size)
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
|
(package private) void |
writeData(OutputStream stream)
Write the block's data to an OutputStream
|
doWriteData, writeBlocks
private static final byte _default_value
private IntegerField _bat_count
private IntegerField _property_start
private IntegerField _sbat_start
private IntegerField _sbat_block_count
private IntegerField _xbat_start
private IntegerField _xbat_count
private byte[] _data
private int bigBlockSize
public HeaderBlockWriter(int blockSize)
public int getBigBlockSize()
getBigBlockSize
in class BigBlock
public BATBlock[] setBATBlocks(int blockCount, int startBlock, int size)
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 blocksstatic int calculateXBATStorageRequirements(int blockCount, int size)
blockCount
- number of BAT blocksvoid writeData(OutputStream stream) throws IOException
writeData
in class BigBlock
stream
- the OutputStream to which the stored data should
be writtenIOException
- on problems writing to the specified
streamCopyright © 2015 Open Microscopy Environment