Save This Page
Home » poi-src-3.2-FINAL-20081019 » org.apache.poi.poifs » storage » [javadoc | source]
org.apache.poi.poifs.storage
public class: BlockAllocationTableWriter [javadoc | source]
java.lang.Object
   org.apache.poi.poifs.storage.BlockAllocationTableWriter

All Implemented Interfaces:
    BlockWritable, BATManaged

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.

Constructor:
 public BlockAllocationTableWriter() 
Method from org.apache.poi.poifs.storage.BlockAllocationTableWriter Summary:
allocateSpace,   countBlocks,   createBlocks,   getStartBlock,   setStartBlock,   simpleCreateBlocks,   writeBlocks
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.poi.poifs.storage.BlockAllocationTableWriter Detail:
 public int allocateSpace(int blockCount) 
    Allocate space for a block of indices
 public int countBlocks() 
    Return the number of BigBlock's this instance uses
 public int createBlocks() 
    Create the BATBlocks we need
 public int getStartBlock() 
    get the starting block
 public  void setStartBlock(int start_block) 
    Set the start block for this instance
  void simpleCreateBlocks() 
    create the BATBlocks
 public  void writeBlocks(OutputStream stream) throws IOException 
    Write the storage to an OutputStream