Package loci.poi.poifs.storage
Class SmallDocumentBlockList
java.lang.Object
loci.poi.poifs.storage.SmallDocumentBlockList
- All Implemented Interfaces:
BlockList
A list of SmallDocumentBlocks instances, and methods to manage the list
- Author:
- Marc Johnson (mjohnson at apache dot org)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfetchBlocks(int startBlock) get the blocks making up a particular stream in the list.remove(int index) remove and return the specified block from the listvoidset the associated BlockAllocationTableprotected voidsetBlocks(ListManagedBlock[] blocks) provide blocks to managevoidzap(int index) remove the specified block from the list
-
Field Details
-
_blocks
-
-
Constructor Details
-
SmallDocumentBlockList
Constructor SmallDocumentBlockList- Parameters:
blocks- a list of SmallDocumentBlock instances
-
-
Method Details
-
getBlocks
-
setBlocks
provide blocks to manage- Parameters:
blocks- blocks to be managed
-
zap
public void zap(int index) remove the specified block from the list -
remove
remove and return the specified block from the list- Specified by:
removein interfaceBlockList- Parameters:
index- the index of the specified block- Returns:
- the specified block
- Throws:
IOException- if the index is out of range or has already been removed
-
fetchBlocks
get the blocks making up a particular stream in the list. The blocks are removed from the list.- Specified by:
fetchBlocksin interfaceBlockList- Parameters:
startBlock- the index of the first block in the stream- Returns:
- the stream as an array of correctly ordered blocks
- Throws:
IOException- if blocks are missing
-
setBAT
set the associated BlockAllocationTable- Specified by:
setBATin interfaceBlockList- Parameters:
bat- the associated BlockAllocationTable- Throws:
IOException
-