| java.lang.Object org.apache.poi.poifs.storage.SmallDocumentBlock
SmallDocumentBlock | public class SmallDocumentBlock implements BlockWritable,ListManagedBlock(Code) | | Storage for documents that are too small to use regular
DocumentBlocks for their data
author: Marc Johnson (mjohnson at apache dot org) |
calcSize | public static int calcSize(int size)(Code) | | Calculate the storage size of a set of SmallDocumentBlocks
Parameters: size - number of SmallDocumentBlocks total size |
convert | public static SmallDocumentBlock[] convert(byte[] array, int size)(Code) | | convert a single long array into an array of SmallDocumentBlock
instances
Parameters: array - the byte array to be converted Parameters: size - the intended size of the array (which may be smaller) an array of SmallDocumentBlock instances, filled fromthe array |
extract | public static List extract(ListManagedBlock[] blocks) throws IOException(Code) | | create a list of SmallDocumentBlock's from raw data
Parameters: blocks - the raw data containing the SmallDocumentBlockdata a List of SmallDocumentBlock's extracted from the input exception: IOException - |
fill | public static int fill(List blocks)(Code) | | fill out a List of SmallDocumentBlocks so that it fully occupies
a set of big blocks
Parameters: blocks - the List to be filled out number of big blocks the list encompasses |
getData | public byte[] getData() throws IOException(Code) | | Get the data from the block
the block's data as a byte array exception: IOException - if there is no data |
read | public static void read(BlockWritable[] blocks, byte[] buffer, int offset)(Code) | | read data from an array of SmallDocumentBlocks
Parameters: blocks - the blocks to read from Parameters: buffer - the buffer to write the data into Parameters: offset - the offset into the array of blocks to read from |
writeBlocks | public void writeBlocks(OutputStream stream) throws IOException(Code) | | Write the storage to an OutputStream
Parameters: stream - the OutputStream to which the stored data shouldbe written exception: IOException - on problems writing to the specifiedstream |
|
|