Package org.apache.poi.poifs.property

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


   * @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

     * @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
      int length = store(stream);

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

       POIFSWriterEvent event = new POIFSWriterEvent(os, path, docName, size);
       writer.processPOIFSWriterEvent(event);
       innerOs.close();

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

     */

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

        (( DirectoryProperty ) getProperty()).addChild(property);
        _filesystem.addDocument(document);
        _entries.put(property.getName(), rval);
        return rval;
    }
View Full Code Here

   * @param length the actual length of the POIFSDocument
   */
  public POIFSDocument(String name, RawDataBlock[] blocks, int length) throws IOException {
    _size = length;
    _big_store = new BigBlockStore(convertRawBlocksToBigBlocks(blocks));
    _property = new DocumentProperty(name, _size);
    _small_store = new SmallBlockStore(EMPTY_SMALL_BLOCK_ARRAY);
    _property.setDocument(this);
  }
View Full Code Here

   * @param length the actual length of the POIFSDocument
   */
  public POIFSDocument(String name, SmallDocumentBlock[] blocks, int length) {
    _size = length;
    _big_store = new BigBlockStore(EMPTY_BIG_BLOCK_ARRAY);
    _property = new DocumentProperty(name, _size);
    _small_store = new SmallBlockStore(blocks);
    _property.setDocument(this);
  }
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.