Constructor and Description |
---|
RawDataBlockList(InputStream stream,
POIFSBigBlockSize bigBlockSize)
Constructor RawDataBlockList
|
Modifier and Type | Method and Description |
---|---|
int |
blockCount()
Returns the count of the number of blocks
|
ListManagedBlock[] |
fetchBlocks(int startBlock,
int headerPropertiesStartBlock)
get the blocks making up a particular stream in the list.
|
protected ListManagedBlock |
get(int index)
Unit testing method.
|
protected int |
remainingBlocks()
Returns the number of remaining blocks
|
ListManagedBlock |
remove(int index)
remove and return the specified block from the list
|
void |
setBAT(BlockAllocationTableReader bat)
set the associated BlockAllocationTable
|
protected void |
setBlocks(ListManagedBlock[] blocks)
provide blocks to manage
|
void |
zap(int index)
remove the specified block from the list
|
public RawDataBlockList(InputStream stream, POIFSBigBlockSize bigBlockSize) throws IOException
stream
- the InputStream from which the data will be readbigBlockSize
- The big block size, either 512 bytes or 4096 bytesIOException
- on I/O errors, and if an incomplete
block is readprotected void setBlocks(ListManagedBlock[] blocks)
blocks
- blocks to be managedpublic void zap(int index)
protected ListManagedBlock get(int index)
public ListManagedBlock remove(int index) throws IOException
remove
in interface BlockList
index
- the index of the specified blockIOException
- if the index is out of range or has
already been removedpublic ListManagedBlock[] fetchBlocks(int startBlock, int headerPropertiesStartBlock) throws IOException
fetchBlocks
in interface BlockList
startBlock
- the index of the first block in the streamheaderPropertiesStartBlock
- the index of the first header block in the streamIOException
- if blocks are missingpublic void setBAT(BlockAllocationTableReader bat) throws IOException
setBAT
in interface BlockList
bat
- the associated BlockAllocationTableIOException
public int blockCount()
blockCount
in interface BlockList
protected int remainingBlocks()
Copyright © 2020. All rights reserved.