_big_store = new BigBlockStore(bigBlockSize,bigBlocks); _property = new DocumentProperty(name, _size); _property.setDocument(this); if (_property.shouldUseSmallBlocks()) { _small_store = new SmallBlockStore(bigBlockSize,SmallDocumentBlock.convert(bigBlockSize,bigBlocks, _size)); _big_store = new BigBlockStore(bigBlockSize,new DocumentBlock[0]); } else { _small_store = new SmallBlockStore(bigBlockSize,EMPTY_SMALL_BLOCK_ARRAY);
_big_store = new BigBlockStore(bigBlockSize,bigBlocks); _property = new DocumentProperty(name, _size); _property.setDocument(this); if (_property.shouldUseSmallBlocks()) { _small_store = new SmallBlockStore(bigBlockSize,SmallDocumentBlock.convert(bigBlockSize,bigBlocks, _size)); _big_store = new BigBlockStore(bigBlockSize,new DocumentBlock[0]); } else { _small_store = new SmallBlockStore(bigBlockSize,EMPTY_SMALL_BLOCK_ARRAY);
/** * Constructor from large blocks * * @param name the name of the POIFSDocument * @param blocks the big blocks making up the POIFSDocument * @param length the actual length of the POIFSDocument */ public POIFSDocument(String name, RawDataBlock[] blocks, int length) throws IOException { _size = length; if(blocks.length == 0) { _bigBigBlockSize = POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS; } else { _bigBigBlockSize = (blocks[0].getBigBlockSize() == POIFSConstants.SMALLER_BIG_BLOCK_SIZE ? POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS : POIFSConstants.LARGER_BIG_BLOCK_SIZE_DETAILS ); } _big_store = new BigBlockStore(_bigBigBlockSize, convertRawBlocksToBigBlocks(blocks)); _property = new DocumentProperty(name, _size); _small_store = new SmallBlockStore(_bigBigBlockSize, EMPTY_SMALL_BLOCK_ARRAY); _property.setDocument(this); }
/** * Constructor * * @param name the name of the POIFSDocument * @param size the length of the POIFSDocument * @param path the path of the POIFSDocument * @param writer the writer who will eventually write the document contents */ public POIFSDocument(String name, int size, POIFSBigBlockSize bigBlockSize, POIFSDocumentPath path, POIFSWriterListener writer) { _size = size; _bigBigBlockSize = bigBlockSize; _property = new DocumentProperty(name, _size); _property.setDocument(this); if (_property.shouldUseSmallBlocks()) { _small_store = new SmallBlockStore(_bigBigBlockSize, path, name, size, writer); _big_store = new BigBlockStore(_bigBigBlockSize, EMPTY_BIG_BLOCK_ARRAY); } else { _small_store = new SmallBlockStore(_bigBigBlockSize, EMPTY_SMALL_BLOCK_ARRAY); _big_store = new BigBlockStore(_bigBigBlockSize, path, name, size, writer); } } public POIFSDocument(String name, int size, POIFSDocumentPath path, POIFSWriterListener writer) {
/** * Constructor from small blocks * * @param name the name of the POIFSDocument * @param blocks the small blocks making up the POIFSDocument * @param length the actual length of the POIFSDocument */ public POIFSDocument(String name, POIFSBigBlockSize bigBlockSize, ListManagedBlock[] blocks, int length) throws IOException { _size = length; _bigBigBlockSize = bigBlockSize; _property = new DocumentProperty(name, _size); _property.setDocument(this); if (Property.isSmall(_size)) { _big_store = new BigBlockStore(bigBlockSize,EMPTY_BIG_BLOCK_ARRAY); _small_store = new SmallBlockStore(bigBlockSize,convertRawBlocksToSmallBlocks(blocks)); } else { _big_store = new BigBlockStore(bigBlockSize,convertRawBlocksToBigBlocks(blocks)); _small_store = new SmallBlockStore(bigBlockSize,EMPTY_SMALL_BLOCK_ARRAY); } } public POIFSDocument(String name, ListManagedBlock[] blocks, int length) throws IOException {
/** * Constructor from large blocks * * @param name the name of the POIFSDocument * @param blocks the big blocks making up the POIFSDocument * @param length the actual length of the POIFSDocument */ public POIFSDocument(String name, RawDataBlock[] blocks, int length) throws IOException { _size = length; if(blocks.length == 0) { _bigBigBlockSize = POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS; } else { _bigBigBlockSize = (blocks[0].getBigBlockSize() == POIFSConstants.SMALLER_BIG_BLOCK_SIZE ? POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS : POIFSConstants.LARGER_BIG_BLOCK_SIZE_DETAILS ); } _big_store = new BigBlockStore(_bigBigBlockSize, convertRawBlocksToBigBlocks(blocks)); _property = new DocumentProperty(name, _size); _small_store = new SmallBlockStore(_bigBigBlockSize, EMPTY_SMALL_BLOCK_ARRAY); _property.setDocument(this); }
/** * Constructor from small blocks * * @param name the name of the POIFSDocument * @param blocks the small blocks making up the POIFSDocument * @param length the actual length of the POIFSDocument */ public POIFSDocument(String name, SmallDocumentBlock[] blocks, int length) { _size = length; if(blocks.length == 0) { _bigBigBlockSize = POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS; } else { _bigBigBlockSize = blocks[0].getBigBlockSize(); } _big_store = new BigBlockStore(_bigBigBlockSize, EMPTY_BIG_BLOCK_ARRAY); _property = new DocumentProperty(name, _size); _small_store = new SmallBlockStore(_bigBigBlockSize, blocks); _property.setDocument(this); }
/** * Constructor from small blocks * * @param name the name of the POIFSDocument * @param blocks the small blocks making up the POIFSDocument * @param length the actual length of the POIFSDocument */ public POIFSDocument(String name, POIFSBigBlockSize bigBlockSize, ListManagedBlock[] blocks, int length) throws IOException { _size = length; _bigBigBlockSize = bigBlockSize; _property = new DocumentProperty(name, _size); _property.setDocument(this); if (Property.isSmall(_size)) { _big_store = new BigBlockStore(bigBlockSize,EMPTY_BIG_BLOCK_ARRAY); _small_store = new SmallBlockStore(bigBlockSize,convertRawBlocksToSmallBlocks(blocks)); } else { _big_store = new BigBlockStore(bigBlockSize,convertRawBlocksToBigBlocks(blocks)); _small_store = new SmallBlockStore(bigBlockSize,EMPTY_SMALL_BLOCK_ARRAY); } } public POIFSDocument(String name, ListManagedBlock[] blocks, int length) throws IOException {
/** * Constructor * * @param name the name of the POIFSDocument * @param size the length of the POIFSDocument * @param path the path of the POIFSDocument * @param writer the writer who will eventually write the document contents */ public POIFSDocument(String name, int size, POIFSBigBlockSize bigBlockSize, POIFSDocumentPath path, POIFSWriterListener writer) { _size = size; _bigBigBlockSize = bigBlockSize; _property = new DocumentProperty(name, _size); _property.setDocument(this); if (_property.shouldUseSmallBlocks()) { _small_store = new SmallBlockStore(_bigBigBlockSize, path, name, size, writer); _big_store = new BigBlockStore(_bigBigBlockSize, EMPTY_BIG_BLOCK_ARRAY); } else { _small_store = new SmallBlockStore(_bigBigBlockSize, EMPTY_SMALL_BLOCK_ARRAY); _big_store = new BigBlockStore(_bigBigBlockSize, path, name, size, writer); } } public POIFSDocument(String name, int size, POIFSDocumentPath path, POIFSWriterListener writer) {
/** * Constructor from small blocks * * @param name the name of the POIFSDocument * @param blocks the small blocks making up the POIFSDocument * @param length the actual length of the POIFSDocument */ public POIFSDocument(String name, SmallDocumentBlock[] blocks, int length) { _size = length; if(blocks.length == 0) { _bigBigBlockSize = POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS; } else { _bigBigBlockSize = blocks[0].getBigBlockSize(); } _big_store = new BigBlockStore(_bigBigBlockSize, EMPTY_BIG_BLOCK_ARRAY); _property = new DocumentProperty(name, _size); _small_store = new SmallBlockStore(_bigBigBlockSize, blocks); _property.setDocument(this); }