Package org.apache.poi.poifs.property

Examples of org.apache.poi.poifs.property.DocumentProperty


   * @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 {
View Full Code Here


     * @exception IOException
     */
    DocumentEntry createDocument(final POIFSDocument document)
        throws IOException
    {
        DocumentProperty property = document.getDocumentProperty();
        DocumentNode     rval     = new DocumentNode(property, this);

        (( DirectoryProperty ) getProperty()).addChild(property);
        _ofilesystem.addDocument(document);

        _entries.add(rval);
        _byname.put(property.getName(), rval);
        return rval;
    }
View Full Code Here

     * @exception IOException
     */
    DocumentEntry createDocument(final NPOIFSDocument document)
        throws IOException
    {
        DocumentProperty property = document.getDocumentProperty();
        DocumentNode     rval     = new DocumentNode(property, this);

        (( DirectoryProperty ) getProperty()).addChild(property);
        _nfilesystem.addDocument(document);

        _entries.add(rval);
        _byname.put(property.getName(), rval);
        return rval;
    }
View Full Code Here

      // Store it
      _stream.updateContents(contents);

      // And build the property for it
      this._property = new DocumentProperty(name, contents.length);
      _property.setStartBlock(_stream.getStartBlock());    
   }
View Full Code Here

    _marked_offset_count = 0;
    _document_size = document.getSize();
    _closed = false;
   
      DocumentNode doc = (DocumentNode)document;
    DocumentProperty property = (DocumentProperty)doc.getProperty();
    _document = new NPOIFSDocument(
          property,
          ((DirectoryNode)doc.getParent()).getNFileSystem()
    );
    _data = _document.getBlockIterator();
View Full Code Here

             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);
  }
View Full Code Here

    } 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);
  }
View Full Code Here

   * @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 {
View Full Code Here

      }
    }
    DocumentBlock[] bigBlocks = blocks.toArray(new DocumentBlock[blocks.size()]);

    _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 {
View Full Code Here

   * @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 {
View Full Code Here

TOP

Related Classes of org.apache.poi.poifs.property.DocumentProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.