| java.lang.Object org.apache.poi.poifs.storage.BlockAllocationTableReader
BlockAllocationTableReader | public class BlockAllocationTableReader (Code) | | This class manages and creates the Block Allocation Table, which is
basically a set of linked lists of block indices.
Each block of the filesystem has an index. The first block, the
header, is skipped; the first block after the header is index 0,
the next is index 1, and so on.
A block's index is also its index into the Block Allocation
Table. The entry that it finds in the Block Allocation Table is the
index of the next block in the linked list of blocks making up a
file, or it is set to -2: end of list.
author: Marc Johnson (mjohnson at apache dot org) |
BlockAllocationTableReader | public BlockAllocationTableReader(int block_count, int[] block_array, int xbat_count, int xbat_index, BlockList raw_block_list) throws IOException(Code) | | create a BlockAllocationTableReader for an existing filesystem. Side
effect: when this method finishes, the BAT blocks will have
been removed from the raw block list, and any blocks labeled as
'unused' in the block allocation table will also have been
removed from the raw block list.
Parameters: block_count - the number of BAT blocks making up the blockallocation table Parameters: block_array - the array of BAT block indices from thefilesystem's header Parameters: xbat_count - the number of XBAT blocks Parameters: xbat_index - the index of the first XBAT block Parameters: raw_block_list - the list of RawDataBlocks exception: IOException - if, in trying to create the table, weencounter logic errors |
BlockAllocationTableReader | BlockAllocationTableReader(ListManagedBlock[] blocks, BlockList raw_block_list) throws IOException(Code) | | create a BlockAllocationTableReader from an array of raw data blocks
Parameters: blocks - the raw data Parameters: raw_block_list - the list holding the managed blocks exception: IOException - |
BlockAllocationTableReader | BlockAllocationTableReader()(Code) | | Constructor BlockAllocationTableReader
|
fetchBlocks | ListManagedBlock[] fetchBlocks(int startBlock, BlockList blockList) throws IOException(Code) | | walk the entries from a specified point and return the
associated blocks. The associated blocks are removed from the
block list
Parameters: startBlock - the first block in the chain Parameters: blockList - the raw data block list array of ListManagedBlocks, in their correct order exception: IOException - if there is a problem acquiring the blocks |
getNextBlockIndex | int getNextBlockIndex(int index) throws IOException(Code) | | return the next block index
Parameters: index - of the current block index of the next block (may bePOIFSConstants.END_OF_CHAIN, indicating end of chain(duh)) exception: IOException - if the current block is unused |
isUsed | boolean isUsed(int index)(Code) | | determine whether the block specified by index is used or not
Parameters: index - index of block in question true if the specific block is used, else false |
|
|