/** * <p>Returns the path's parent or <code>null</code> if this path * is the root path.</p> * * @since 2002-01-24 * @return path of parent, or null if this path is the root path */ public POIFSDocumentPath getParent() { final int length = components.length - 1; if (length < 0) { return null; } String[] parentComponents = new String[ length ]; System.arraycopy(components, 0, parentComponents, 0, length); return new POIFSDocumentPath(parentComponents); }
/** * Register a POIFSReaderListener for a document in the specified * directory * * @param listener the listener to be registered * @param path the document path; if null, the root directory is * assumed * @param name the document name * * @exception NullPointerException if listener is null or name is * null or empty * @exception IllegalStateException if read() has already been * called */ public void registerListener(final POIFSReaderListener listener, final POIFSDocumentPath path, final String name) { if ((listener == null) || (name == null) || (name.length() == 0)) { throw new NullPointerException(); } if (registryClosed) { throw new IllegalStateException(); } registry.registerListener(listener, (path == null) ? new POIFSDocumentPath() : path, name); }
/** * Read from a NPOIFSFileSystem and process the documents we get * * @param poifs the NPOIFSFileSystem from which to read the data * * @exception IOException on errors reading, or on invalid data */ public void read(final POIFSFileSystem poifs) throws IOException { registryClosed = true; // get property table from the document PropertyTable properties = poifs.getPropertyTable(); // process documents RootProperty root = properties.getRoot(); processProperties(poifs, root, new POIFSDocumentPath()); }
_path = new POIFSDocumentPath(); _path = new POIFSDocumentPath(parent._path, new String[]
public POIFSDocument(String name, final int size, POIFSFileSystem filesystem, POIFSWriterListener writer) throws IOException { this._filesystem = filesystem; if (size < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) { _stream = new POIFSStream(filesystem.getMiniStore()); _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize(); } else { _stream = new POIFSStream(filesystem); _block_size = _filesystem.getBlockStoreBlockSize(); } this._property = new DocumentProperty(name, size); _property.setStartBlock(_stream.getStartBlock()); _property.setDocument(this); try (DocumentOutputStream os = new DocumentOutputStream(this, size)) { POIFSDocumentPath path = new POIFSDocumentPath(name.split("\\\\")); String docName = path.getComponent(path.length() - 1); POIFSWriterEvent event = new POIFSWriterEvent(os, path, docName, size); writer.processPOIFSWriterEvent(event); } }
POIFSDocumentPath new_path = new POIFSDocumentPath(path,new String[]{name}); processProperties(poifs, (DirectoryProperty) property, new_path); } else {
/** * <p>Returns the path's parent or <code>null</code> if this path * is the root path.</p> * * @since 2002-01-24 * @return path of parent, or null if this path is the root path */ public POIFSDocumentPath getParent() { final int length = components.length - 1; if (length < 0) { return null; } String[] parentComponents = new String[ length ]; System.arraycopy(components, 0, parentComponents, 0, length); return new POIFSDocumentPath(parentComponents); }
/** * <p>Returns the path's parent or <code>null</code> if this path * is the root path.</p> * * @since 2002-01-24 * @return path of parent, or null if this path is the root path */ public POIFSDocumentPath getParent() { final int length = components.length - 1; if (length < 0) { return null; } POIFSDocumentPath parent = new POIFSDocumentPath(null); parent.components = new String[ length ]; System.arraycopy(components, 0, parent.components, 0, length); return parent; }
/** * <p>Returns the path's parent or <code>null</code> if this path * is the root path.</p> * * @since 2002-01-24 * @return path of parent, or null if this path is the root path */ public POIFSDocumentPath getParent() { final int length = components.length - 1; if (length < 0) { return null; } POIFSDocumentPath parent = new POIFSDocumentPath(null); parent.components = new String[ length ]; System.arraycopy(components, 0, parent.components, 0, length); return parent; }
/** * Register a POIFSReaderListener for a document in the specified * directory * * @param listener the listener to be registered * @param path the document path; if null, the root directory is * assumed * @param name the document name * * @exception NullPointerException if listener is null or name is * null or empty * @exception IllegalStateException if read() has already been * called */ public void registerListener(final POIFSReaderListener listener, final POIFSDocumentPath path, final String name) { if ((listener == null) || (name == null) || (name.length() == 0)) { throw new NullPointerException(); } if (registryClosed) { throw new IllegalStateException(); } registry.registerListener(listener, (path == null) ? new POIFSDocumentPath() : path, name); }
/** * Register a POIFSReaderListener for a document in the specified * directory * * @param listener the listener to be registered * @param path the document path; if null, the root directory is * assumed * @param name the document name * * @exception NullPointerException if listener is null or name is * null or empty * @exception IllegalStateException if read() has already been * called */ public void registerListener(final POIFSReaderListener listener, final POIFSDocumentPath path, final String name) { if ((listener == null) || (name == null) || (name.length() == 0)) { throw new NullPointerException(); } if (registryClosed) { throw new IllegalStateException(); } registry.registerListener(listener, (path == null) ? new POIFSDocumentPath() : path, name); }
/** * Register a POIFSReaderListener for a document in the specified * directory * * @param listener the listener to be registered * @param path the document path; if null, the root directory is * assumed * @param name the document name * * @exception NullPointerException if listener is null or name is * null or empty * @exception IllegalStateException if read() has already been * called */ public void registerListener(final POIFSReaderListener listener, final POIFSDocumentPath path, final String name) { if ((listener == null) || (name == null) || (name.length() == 0)) { throw new NullPointerException(); } if (registryClosed) { throw new IllegalStateException(); } registry.registerListener(listener, (path == null) ? new POIFSDocumentPath() : path, name); }
/** * Read from a NPOIFSFileSystem and process the documents we get * * @param poifs the NPOIFSFileSystem from which to read the data * * @exception IOException on errors reading, or on invalid data */ public void read(final POIFSFileSystem poifs) throws IOException { registryClosed = true; // get property table from the document PropertyTable properties = poifs.getPropertyTable(); // process documents RootProperty root = properties.getRoot(); processProperties(poifs, root, new POIFSDocumentPath()); }
_path = new POIFSDocumentPath(); _path = new POIFSDocumentPath(parent._path, new String[]
_path = new POIFSDocumentPath(); _path = new POIFSDocumentPath(parent._path, new String[]
_path = new POIFSDocumentPath(); _path = new POIFSDocumentPath(parent._path, new String[]
public POIFSDocument(String name, final int size, POIFSFileSystem filesystem, POIFSWriterListener writer) throws IOException { this._filesystem = filesystem; if (size < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) { _stream = new POIFSStream(filesystem.getMiniStore()); _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize(); } else { _stream = new POIFSStream(filesystem); _block_size = _filesystem.getBlockStoreBlockSize(); } this._property = new DocumentProperty(name, size); _property.setStartBlock(_stream.getStartBlock()); _property.setDocument(this); try (DocumentOutputStream os = new DocumentOutputStream(this, size)) { POIFSDocumentPath path = new POIFSDocumentPath(name.split("\\\\")); String docName = path.getComponent(path.length() - 1); POIFSWriterEvent event = new POIFSWriterEvent(os, path, docName, size); writer.processPOIFSWriterEvent(event); } }
POIFSDocumentPath new_path = new POIFSDocumentPath(path,new String[]{name}); processProperties(poifs, (DirectoryProperty) property, new_path); } else {
header_block.getSBATStart()), data_blocks, properties.getRoot() .getChildren(), new POIFSDocumentPath());
header_block.getSBATStart()), data_blocks, properties.getRoot() .getChildren(), new POIFSDocumentPath());