public class NPOIFSMiniStore extends BlockStore
NPOIFSFileSystemBlockStore.ChainLoopDetector| Modifier | Constructor and Description |
|---|---|
protected |
NPOIFSMiniStore(NPOIFSFileSystem filesystem,
RootProperty root,
List<BATBlock> sbats,
HeaderBlock header) |
| Modifier and Type | Method and Description |
|---|---|
protected ByteBuffer |
createBlockIfNeeded(int offset)
Load the block, extending the underlying stream if needed
|
protected BATBlock.BATBlockAndIndex |
getBATBlockAndIndex(int offset)
Returns the BATBlock that handles the specified offset,
and the relative index within it
|
protected ByteBuffer |
getBlockAt(int offset)
Load the block at the given offset.
|
protected int |
getBlockStoreBlockSize()
Returns the size of the blocks managed through the block store.
|
protected BlockStore.ChainLoopDetector |
getChainLoopDetector()
Creates a Detector for loops in the chain
|
protected int |
getFreeBlock()
Finds a free block, and returns its offset.
|
protected int |
getNextBlock(int offset)
Works out what block follows the specified one.
|
protected void |
setNextBlock(int offset,
int nextBlock)
Changes the record of what block follows the specified one.
|
protected void |
syncWithDataSource()
Writes the SBATs to their backing blocks
|
protected NPOIFSMiniStore(NPOIFSFileSystem filesystem, RootProperty root, List<BATBlock> sbats, HeaderBlock header)
protected ByteBuffer getBlockAt(int offset) throws IOException
getBlockAt in class BlockStoreIOExceptionprotected ByteBuffer createBlockIfNeeded(int offset) throws IOException
createBlockIfNeeded in class BlockStoreIOExceptionprotected BATBlock.BATBlockAndIndex getBATBlockAndIndex(int offset)
getBATBlockAndIndex in class BlockStoreprotected int getNextBlock(int offset)
getNextBlock in class BlockStoreprotected void setNextBlock(int offset,
int nextBlock)
setNextBlock in class BlockStoreprotected int getFreeBlock()
throws IOException
getFreeBlock in class BlockStoreIOExceptionprotected BlockStore.ChainLoopDetector getChainLoopDetector() throws IOException
BlockStoregetChainLoopDetector in class BlockStoreIOExceptionprotected int getBlockStoreBlockSize()
BlockStoregetBlockStoreBlockSize in class BlockStoreprotected void syncWithDataSource()
throws IOException
IOExceptionCopyright © 2020. All rights reserved.