/** * 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 ODocumentInputStream(DocumentEntry document) throws IOException { if (!(document instanceof DocumentNode)) { throw new IOException("Cannot open internal document storage"); } DocumentNode documentNode = (DocumentNode)document; if(documentNode.getDocument() == null) { throw new IOException("Cannot open internal document storage"); } _current_offset = 0; _marked_offset = 0; _document_size = document.getSize(); _closed = false; _document = documentNode.getDocument(); _currentBlock = getDataInputBlock(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 ODocumentInputStream(DocumentEntry document) throws IOException { if (!(document instanceof DocumentNode)) { throw new IOException("Cannot open internal document storage"); } DocumentNode documentNode = (DocumentNode)document; if(documentNode.getDocument() == null) { throw new IOException("Cannot open internal document storage"); } _current_offset = 0; _marked_offset = 0; _document_size = document.getSize(); _closed = false; _document = documentNode.getDocument(); _currentBlock = getDataInputBlock(0); }
/** * remove an entry * * @param entry to be removed */ void remove(EntryNode entry) { _property_table.removeProperty(entry.getProperty()); if (entry.isDocumentEntry()) { _documents.remove((( DocumentNode ) entry).getDocument()); } }
/** * remove an entry * * @param entry to be removed */ void remove(EntryNode entry) { _property_table.removeProperty(entry.getProperty()); if (entry.isDocumentEntry()) { _documents.remove((( DocumentNode ) entry).getDocument()); } }
/** * 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 DocumentInputStream(DocumentEntry document) throws IOException { if (!(document instanceof DocumentNode)) { throw new IOException("Cannot open internal document storage"); } DocumentNode documentNode = (DocumentNode)document; DirectoryNode parentNode = (DirectoryNode)document.getParent(); if(documentNode.getDocument() != null) { delegate = new ODocumentInputStream(document); } else if(parentNode.getFileSystem() != null) { delegate = new ODocumentInputStream(document); } else if(parentNode.getNFileSystem() != null) { delegate = new NDocumentInputStream(document); } else { throw new IOException("No FileSystem bound on the parent, can't read contents"); } }
/** * 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 DocumentInputStream(DocumentEntry document) throws IOException { if (!(document instanceof DocumentNode)) { throw new IOException("Cannot open internal document storage"); } DocumentNode documentNode = (DocumentNode)document; DirectoryNode parentNode = (DirectoryNode)document.getParent(); if(documentNode.getDocument() != null) { delegate = new ODocumentInputStream(document); } else if(parentNode.getFileSystem() != null) { delegate = new ODocumentInputStream(document); } else if(parentNode.getNFileSystem() != null) { delegate = new NDocumentInputStream(document); } else { throw new IOException("No FileSystem bound on the parent, can't read contents"); } }