Package loci.poi.poifs.storage
Class SmallDocumentBlockList
- java.lang.Object
-
- loci.poi.poifs.storage.SmallDocumentBlockList
-
-
Field Summary
Fields Modifier and Type Field Description protected ListManagedBlock[]
_blocks
-
Constructor Summary
Constructors Constructor Description SmallDocumentBlockList(List blocks)
Constructor SmallDocumentBlockList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListManagedBlock[]
fetchBlocks(int startBlock)
get the blocks making up a particular stream in the list.ListManagedBlock[]
getBlocks()
ListManagedBlock
remove(int index)
remove and return the specified block from the listvoid
setBAT(BlockAllocationTableReader bat)
set the associated BlockAllocationTableprotected void
setBlocks(ListManagedBlock[] blocks)
provide blocks to managevoid
zap(int index)
remove the specified block from the list
-
-
-
Field Detail
-
_blocks
protected ListManagedBlock[] _blocks
-
-
Constructor Detail
-
SmallDocumentBlockList
public SmallDocumentBlockList(List blocks)
Constructor SmallDocumentBlockList- Parameters:
blocks
- a list of SmallDocumentBlock instances
-
-
Method Detail
-
getBlocks
public ListManagedBlock[] getBlocks()
-
setBlocks
protected void setBlocks(ListManagedBlock[] blocks)
provide blocks to manage- Parameters:
blocks
- blocks to be managed
-
zap
public void zap(int index)
remove the specified block from the list
-
remove
public ListManagedBlock remove(int index) throws IOException
remove and return the specified block from the list- Specified by:
remove
in 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
public ListManagedBlock[] fetchBlocks(int startBlock) throws IOException
get the blocks making up a particular stream in the list. The blocks are removed from the list.- Specified by:
fetchBlocks
in 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
public void setBAT(BlockAllocationTableReader bat) throws IOException
set the associated BlockAllocationTable- Specified by:
setBAT
in interfaceBlockList
- Parameters:
bat
- the associated BlockAllocationTable- Throws:
IOException
-
-