예제 #1
0
        /**
         * remove an entry
         *
         * @param entry to be Removed
         */

        public void Remove(EntryNode entry)
        {
            // If it's a document, free the blocks
            if (entry is DocumentEntry)
            {
                NPOIFSDocument doc = new NPOIFSDocument((DocumentProperty)entry.Property, this);
                doc.Free();
            }
            _property_table.RemoveProperty(entry.Property);
        }
예제 #2
0
        /**
         * Create an OutputStream from the specified DocumentEntry.
         * The specified entry will be emptied.
         *
         * @param document the DocumentEntry to be written
         */
        public NDocumentOutputStream(DocumentEntry document)
        {
            if (!(document is DocumentNode))
            {
                throw new IOException("Cannot open internal document storage, " + document + " not a Document Node");
            }
            _document_size = 0;
            _closed        = false;

            _property = (DocumentProperty)((DocumentNode)document).Property;

            _document = new NPOIFSDocument((DocumentNode)document);
            _document.Free();
        }