Package loci.poi.poifs.storage
Class SmallBlockTableWriter
- java.lang.Object
-
- loci.poi.poifs.storage.SmallBlockTableWriter
-
- All Implemented Interfaces:
BATManaged
,BlockWritable
public class SmallBlockTableWriter extends 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
Constructors Constructor Description SmallBlockTableWriter(List documents, RootProperty root)
Creates new SmallBlockTable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
countBlocks()
Return the number of BigBlock's this instance usesBlockAllocationTableWriter
getSBAT()
Get the SBATint
getSBATBlockCount()
Get the number of SBAT blocksvoid
setStartBlock(int start_block)
Set the start block for this instancevoid
writeBlocks(OutputStream stream)
Write the storage to an OutputStream
-
-
-
Constructor Detail
-
SmallBlockTableWriter
public SmallBlockTableWriter(List documents, RootProperty root)
Creates new SmallBlockTable- Parameters:
documents
- a List of POIFSDocument instancesroot
- the Filesystem's root property
-
-
Method Detail
-
getSBATBlockCount
public int getSBATBlockCount()
Get the number of SBAT blocks- Returns:
- number of SBAT big blocks
-
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 interfaceBATManaged
- Returns:
- count of BigBlock instances
-
setStartBlock
public void setStartBlock(int start_block)
Set the start block for this instance- Specified by:
setStartBlock
in interfaceBATManaged
- Parameters:
start_block
-
-
writeBlocks
public void writeBlocks(OutputStream stream) throws IOException
Write the storage to an OutputStream- Specified by:
writeBlocks
in interfaceBlockWritable
- Parameters:
stream
- the OutputStream to which the stored data should be written- Throws:
IOException
- on problems writing to the specified stream
-
-