|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.poifs.filesystem.BlockStore
public abstract class BlockStore
This abstract class describes a way to read, store, chain and free a series of blocks (be they Big or Small ones)
Nested Class Summary | |
---|---|
protected class |
BlockStore.ChainLoopDetector
Used to detect if a chain has a loop in it, so we can bail out with an error rather than spinning away for ever... |
Constructor Summary | |
---|---|
BlockStore()
|
Method Summary | |
---|---|
protected abstract java.nio.ByteBuffer |
createBlockIfNeeded(int offset)
Extends the file if required to hold blocks up to the specified offset, and return the block from there. |
protected abstract BATBlock.BATBlockAndIndex |
getBATBlockAndIndex(int offset)
Returns the BATBlock that handles the specified offset, and the relative index within it |
protected abstract java.nio.ByteBuffer |
getBlockAt(int offset)
Load the block at the given offset. |
protected abstract int |
getBlockStoreBlockSize()
Returns the size of the blocks managed through the block store. |
protected abstract BlockStore.ChainLoopDetector |
getChainLoopDetector()
Creates a Detector for loops in the chain |
protected abstract int |
getFreeBlock()
Finds a free block, and returns its offset. |
protected abstract int |
getNextBlock(int offset)
Works out what block follows the specified one. |
protected abstract void |
setNextBlock(int offset,
int nextBlock)
Changes the record of what block follows the specified one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockStore()
Method Detail |
---|
protected abstract int getBlockStoreBlockSize()
protected abstract java.nio.ByteBuffer getBlockAt(int offset) throws java.io.IOException
java.io.IOException
protected abstract java.nio.ByteBuffer createBlockIfNeeded(int offset) throws java.io.IOException
java.io.IOException
protected abstract BATBlock.BATBlockAndIndex getBATBlockAndIndex(int offset)
protected abstract int getNextBlock(int offset)
protected abstract void setNextBlock(int offset, int nextBlock)
protected abstract int getFreeBlock() throws java.io.IOException
java.io.IOException
protected abstract BlockStore.ChainLoopDetector getChainLoopDetector() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |