public class RawDataBlock extends Object implements ListManagedBlock
| Constructor and Description |
|---|
RawDataBlock(InputStream stream)
Constructor RawDataBlock
|
RawDataBlock(InputStream stream,
int blockSize)
Constructor RawDataBlock
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
eof()
When we read the data, did we hit end of file?
|
int |
getBigBlockSize()
What's the big block size?
|
byte[] |
getData()
Get the data from the block
|
boolean |
hasData()
Did we actually find any data to read? It's possible,
in the event of a short last block, to both have hit
the EoF, but also to have data
|
String |
toString() |
public RawDataBlock(InputStream stream) throws IOException
stream - the InputStream from which the data will be readIOException - on I/O errors, and if an insufficient
amount of data is read (the InputStream must
be an exact multiple of the block size)public RawDataBlock(InputStream stream, int blockSize) throws IOException
stream - the InputStream from which the data will be readblockSize - the size of the POIFS blocks, normally 512 bytes
POIFSConstants.SMALLER_BIG_BLOCK_SIZEIOException - on I/O errors, and if an insufficient
amount of data is read (the InputStream must
be an exact multiple of the block size)public boolean eof()
public boolean hasData()
public byte[] getData()
throws IOException
getData in interface ListManagedBlockIOException - if there is no datapublic int getBigBlockSize()
Copyright © 2020. All rights reserved.