public final class HeaderBlock extends java.lang.Object implements HeaderBlockConstants
_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 and Description |
---|
HeaderBlock(java.nio.ByteBuffer buffer) |
HeaderBlock(java.io.InputStream stream)
create a new HeaderBlockReader from an InputStream
|
HeaderBlock(POIFSBigBlockSize bigBlockSize)
Create a single instance initialized with default values
|
Modifier and Type | Method and Description |
---|---|
int[] |
getBATArray()
Returns the offsets to the first (up to) 109 BAT sectors.
(返回前 109 个 BAT 扇区的偏移量。)
|
int |
getBATCount() |
POIFSBigBlockSize |
getBigBlockSize() |
int |
getPropertyStart()
get start of Property Table
(开始属性表)
|
int |
getSBATCount() |
int |
getSBATStart() |
int |
getXBATCount() |
int |
getXBATIndex() |
void |
setBATArray(int[] bat_array)
Sets the offsets of the first (up to) 109 BAT sectors.
(设置前(最多)109 个 BAT 扇区的偏移量。)
|
void |
setBATCount(int count)
Sets the number of BAT blocks that are used.
(设置使用的 BAT 块数。)
|
void |
setPropertyStart(int startBlock)
Set start of Property Table
(设置属性表的开始)
|
void |
setSBATBlockCount(int count)
Set count of SBAT blocks
(设置 SBAT 块数)
|
void |
setSBATStart(int startBlock)
Set start of small block allocation table
(设置小块分配表的开始)
|
void |
setXBATCount(int count)
Sets the number of XBAT (DIFAT) blocks used
(设置使用的 XBAT (DIFAT) 块的数量)
|
void |
setXBATStart(int startBlock)
Sets the first XBAT (DIFAT) block location
(设置第一个 XBAT (DIFAT) 块位置)
|
void |
writeData(java.io.OutputStream stream)
Write the block's data to an OutputStream
(将块的数据写入 OutputStream)
|
public HeaderBlock(java.io.InputStream stream) throws java.io.IOException
stream
- the source InputStream
(stream - 源 InputStream)
java.io.IOException
- on errors or bad data
(java.io.IOException - 错误或错误数据)
public HeaderBlock(java.nio.ByteBuffer buffer) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public HeaderBlock(POIFSBigBlockSize bigBlockSize)
public int getPropertyStart()
public void setPropertyStart(int startBlock)
startBlock
- the index of the first block of the Property Table
(startBlock - 属性表第一个块的索引)
public int getSBATStart()
public int getSBATCount()
public void setSBATStart(int startBlock)
startBlock
- the index of the first big block of the small block allocation table
(startBlock - 小块分配表的第一个大块的索引)
public void setSBATBlockCount(int count)
count
- the number of SBAT blocks
(count - SBAT 块的数量)
public int getBATCount()
public void setBATCount(int count)
public int[] getBATArray()
public void setBATArray(int[] bat_array)
public int getXBATCount()
public void setXBATCount(int count)
public int getXBATIndex()
public void setXBATStart(int startBlock)
public POIFSBigBlockSize getBigBlockSize()
public void writeData(java.io.OutputStream stream) throws java.io.IOException
stream
- the OutputStream to which the stored data should be written
(stream - 存储数据应写入的 OutputStream)
java.io.IOException
- on problems writing to the specified stream
(java.io.IOException - 关于写入指定流的问题)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.