Class POIFSMiniStore


  • public class POIFSMiniStore
    extends BlockStore
    This class handles the MiniStream (small block store) in the NIO case for POIFSFileSystem
    • Method Detail

      • getBlockAt

        protected java.nio.ByteBuffer getBlockAt​(int offset)
        Load the block at the given offset.
        Specified by:
        getBlockAt in class BlockStore
      • createBlockIfNeeded

        protected java.nio.ByteBuffer createBlockIfNeeded​(int offset)
                                                   throws java.io.IOException
        Load the block, extending the underlying stream if needed
        Specified by:
        createBlockIfNeeded in class BlockStore
        Throws:
        java.io.IOException
      • getNextBlock

        protected int getNextBlock​(int offset)
        Works out what block follows the specified one.
        Specified by:
        getNextBlock in class BlockStore
      • setNextBlock

        protected void setNextBlock​(int offset,
                                    int nextBlock)
        Changes the record of what block follows the specified one.
        Specified by:
        setNextBlock in class BlockStore
      • getFreeBlock

        protected int getFreeBlock()
                            throws java.io.IOException
        Finds a free block, and returns its offset. This method will extend the file if needed, and if doing so, allocate new FAT blocks to address the extra space.
        Specified by:
        getFreeBlock in class BlockStore
        Throws:
        java.io.IOException
      • getBlockStoreBlockSize

        protected int getBlockStoreBlockSize()
        Description copied from class: BlockStore
        Returns the size of the blocks managed through the block store.
        Specified by:
        getBlockStoreBlockSize in class BlockStore