Documentation of 'org.apache.poi.poifs.storage.HeaderBlockWriter' Java class
HeaderBlockWriter
org.apache.poi.poifs.storage

Class HeaderBlockWriter

    • Constructor Detail

      • HeaderBlockWriter

        public HeaderBlockWriter(POIFSBigBlockSize bigBlockSize)
        Create a single instance initialized with default values
      • HeaderBlockWriter

        public HeaderBlockWriter(HeaderBlock headerBlock)
        Create a single instance initialized with the specified existing values
    • Method Detail

      • setBATBlocks

        public BATBlock[] setBATBlocks(int blockCount,
                                       int startBlock)
        Set BAT block parameters. Assumes that all BAT blocks are contiguous. Will construct XBAT blocks if necessary and return the array of newly constructed XBAT blocks.
        Parameters:
        blockCount - count of BAT blocks
        startBlock - index of first BAT block
        Returns:
        array of XBAT blocks; may be zero length, will not be null
      • setPropertyStart

        public void setPropertyStart(int startBlock)
        Set start of Property Table
        Parameters:
        startBlock - the index of the first block of the Property Table
      • setSBATStart

        public void setSBATStart(int startBlock)
        Set start of small block allocation table
        Parameters:
        startBlock - the index of the first big block of the small block allocation table
      • setSBATBlockCount

        public void setSBATBlockCount(int count)
        Set count of SBAT blocks
        Parameters:
        count - the number of SBAT blocks
      • writeBlocks

        public void writeBlocks(java.io.OutputStream stream)
                         throws java.io.IOException
        Write the block's data 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
      • writeBlock

        public void writeBlock(java.nio.ByteBuffer block)
                        throws java.io.IOException
        Write the block's data to an existing block
        Parameters:
        block - the ByteBuffer of the block to which the stored data should be written
        Throws:
        java.io.IOException - on problems writing to the block

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.