Package org.apache.poi.poifs.property

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


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

        _big_store = new BigBlockStore(bigBlocks);
        _property  = new DocumentProperty(name, _size);
        _property.setDocument(this);
        if (_property.shouldUseSmallBlocks())
        {
            _small_store =
                new SmallBlockStore(SmallDocumentBlock.convert(bigBlocks,
View Full Code Here


                         final POIFSDocumentPath path,
                         final POIFSWriterListener writer)
        throws IOException
    {
        _size     = size;
        _property = new DocumentProperty(name, _size);
        _property.setDocument(this);
        if (_property.shouldUseSmallBlocks())
        {
            _small_store = new SmallBlockStore(path, name, size, writer);
            _big_store   = new BigBlockStore(new Object[ 0 ]);
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

   * @param blocks the small blocks making up the POIFSDocument
   * @param length the actual length of the POIFSDocument
   */
  public POIFSDocument(String name, ListManagedBlock[] blocks, int length) throws IOException {
    _size = length;
    _property = new DocumentProperty(name, _size);
    _property.setDocument(this);
    if (Property.isSmall(_size)) {
      _big_store = new BigBlockStore(EMPTY_BIG_BLOCK_ARRAY);
      _small_store = new SmallBlockStore(convertRawBlocksToSmallBlocks(blocks));
    } else {
View Full Code Here

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

    _big_store = new BigBlockStore(bigBlocks);
    _property = new DocumentProperty(name, _size);
    _property.setDocument(this);
    if (_property.shouldUseSmallBlocks()) {
      _small_store = new SmallBlockStore(SmallDocumentBlock.convert(bigBlocks, _size));
      _big_store = new BigBlockStore(new DocumentBlock[0]);
    } else {
View Full Code Here

   * @param path the path of the POIFSDocument
   * @param writer the writer who will eventually write the document contents
   */
  public POIFSDocument(String name, int size, POIFSDocumentPath path, POIFSWriterListener writer) {
    _size = size;
    _property = new DocumentProperty(name, _size);
    _property.setDocument(this);
    if (_property.shouldUseSmallBlocks()) {
      _small_store = new SmallBlockStore(path, name, size, writer);
      _big_store = new BigBlockStore(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

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.