Class 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 Detail

      • SmallBlockTableWriter

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

      • getSBATBlockCount

        public int getSBATBlockCount()
        Get the number of SBAT blocks
        Returns:
        number of SBAT big blocks
      • 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​(OutputStream stream)
                         throws 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:
        IOException - on problems writing to the specified stream