Package loci.poi.poifs.storage
Class RawDataBlockList
java.lang.Object
loci.poi.poifs.storage.RawDataBlockList
- All Implemented Interfaces:
BlockList
A list of RawDataBlocks instances, and methods to manage the list
- Author:
- Marc Johnson (mjohnson at apache dot org
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRawDataBlockList(loci.common.RandomAccessInputStream stream, int size) Constructor RawDataBlockList -
Method Summary
Modifier and TypeMethodDescriptionfetchBlocks(int startBlock) get the blocks making up a particular stream in the list.intremove(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
-
RawDataBlockList
Constructor RawDataBlockList- Parameters:
stream- the InputStream from which the data will be read- Throws:
IOException- on I/O errors, and if an incomplete block is read
-
-
Method Details
-
getBigBlockSize
public int getBigBlockSize() -
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
-