org.apache.poi.poifs.storage
Class SmallBlockTableWriter

java.lang.Object
  |
  +--org.apache.poi.poifs.storage.SmallBlockTableWriter
All Implemented Interfaces:
BATManaged, BlockWritable

public class SmallBlockTableWriter
extends java.lang.Object
implements BlockWritable, BATManaged

This class implements storage for writing the small blocks used by small documents.

Author:
Marc Johnson (mjohnson at apache dot org)

Constructor Summary
SmallBlockTableWriter(java.util.List documents, RootProperty root)
          Creates new SmallBlockTable
 
Method Summary
 int countBlocks()
          Return the number of BigBlock's this instance uses
 BlockAllocationTableWriter getSBAT()
          Get the SBAT
 void setStartBlock(int start_block)
          Set the start block for this instance
 void writeBlocks(java.io.OutputStream stream)
          Write the storage to an OutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmallBlockTableWriter

public SmallBlockTableWriter(java.util.List documents,
                             RootProperty root)
Creates new SmallBlockTable
Parameters:
documents - a List of POIFSDocument instances
root - the Filesystem's root property
Method Detail

getSBAT

public BlockAllocationTableWriter getSBAT()
Get the SBAT
Returns:
the Small Block Allocation Table

countBlocks

public int countBlocks()
Return the number of BigBlock's this instance uses
Specified by:
countBlocks in interface BATManaged
Returns:
count of BigBlock instances

setStartBlock

public void setStartBlock(int start_block)
Set the start block for this instance
Specified by:
setStartBlock in interface BATManaged
Parameters:
index - index into the array of BigBlock instances making up the the filesystem
start_block -  

writeBlocks

public void writeBlocks(java.io.OutputStream stream)
                 throws java.io.IOException
Write the storage to an OutputStream
Specified by:
writeBlocks in interface BlockWritable
Parameters:
stream - the OutputStream to which the stored data should be written
Throws:
java.io.IOException - on problems writing to the specified stream


Copyright © 2002 Apache jakarta-poi project. All Rights Reserved.