コード例 #1
0
ファイル: NPOIFSFileSystem.cs プロジェクト: shnug/OLE2Storage
        /**
         * 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();
        }
コード例 #3
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();
        }
コード例 #4
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);
        }