Class SmallBlockTableWriter

java.lang.Object
org.docx4j.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

    Constructors 
    Constructor Description
    SmallBlockTableWriter​(POIFSBigBlockSize bigBlockSize, java.util.List<OPOIFSDocument> documents, RootProperty root)
    Creates new SmallBlockTable
  • Method Summary

    Modifier and Type Method Description
    int countBlocks()
    Return the number of BigBlock's this instance uses
    BlockAllocationTableWriter getSBAT()
    Get the SBAT
    int getSBATBlockCount()
    Get the number of SBAT blocks
    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 Details

  • Method Details

    • 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 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:
      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