Example #1
0
 /**
  * Create an InputStream from the specified Document
  *
  * @param document the Document to be read
  */
 public NDocumentInputStream(NPOIFSDocument document)
 {
     _current_offset      = 0;
     _current_block_count = 0;
     _marked_offset       = 0;
     _marked_offset_count = 0;
     _document_size       = document.Size;
     _closed   = false;
     _document = document;
     _data     = _document.GetBlockIterator();
 }
Example #2
0
        public DocumentEntry CreateDocument(NPOIFSDocument document)
        {
            try
            {
                DocumentProperty property = document.DocumentProperty;
                DocumentNode     rval     = new DocumentNode(property, this);

                ((DirectoryProperty)Property).AddChild(property);

                _nFilesSystem.AddDocument(document);

                _entries.Add(rval);
                _byname[property.Name] = rval;

                return(rval);
            }
            catch (IOException ex)
            {
                throw ex;
            }
        }
Example #3
0
        /**
         * Create an InputStream from the specified DocumentEntry
         *
         * @param document the DocumentEntry to be read
         *
         * @exception IOException if the DocumentEntry cannot be opened (like, maybe it has
         *                been deleted?)
         */
        public NDocumentInputStream(DocumentEntry document)
        {
            if (!(document is DocumentNode))
            {
                throw new IOException("Cannot open internal document storage, " + document + " not a Document Node");
            }
            _current_offset      = 0;
            _current_block_count = 0;
            _marked_offset       = 0;
            _marked_offset_count = 0;
            _document_size       = document.Size;
            _closed = false;

            DocumentNode     doc      = (DocumentNode)document;
            DocumentProperty property = (DocumentProperty)doc.Property;

            _document = new NPOIFSDocument(
                property,
                ((DirectoryNode)doc.Parent).NFileSystem
                );
            _data = _document.GetBlockIterator();
        }
Example #4
0
 /**
  * Create an InputStream from the specified Document
  *
  * @param document the Document to be read
  */
 public DocumentInputStream(NPOIFSDocument document)
 {
     delegate1 = new NDocumentInputStream(document);
 }
 /**
  * Create an InputStream from the specified Document
  * 
  * @param document the Document to be read
  */
 public DocumentInputStream(NPOIFSDocument document)
 {
     delegate1 = new NDocumentInputStream(document);
 }
 /**
  * add a new POIFSDocument to the FileSytem 
  *
  * @param document the POIFSDocument being Added
  */
 public void AddDocument(NPOIFSDocument document)
 {
     _property_table.AddProperty(document.DocumentProperty);
 }
Example #7
0
 /**
  * add a new POIFSDocument to the FileSytem
  *
  * @param document the POIFSDocument being Added
  */
 public void AddDocument(NPOIFSDocument document)
 {
     _property_table.AddProperty(document.DocumentProperty);
 }