/** * Set the contents of a document in the root directory, * creating if needed, otherwise updating * * @param stream the InputStream from which the document's data * will be obtained * @param name the name of the new or existing POIFSDocument * * @return the new or updated DocumentEntry * * @exception IOException on error populating the POIFSDocument */ @SuppressWarnings("UnusedReturnValue") public DocumentEntry createOrUpdateDocument(final InputStream stream, final String name) throws IOException { return getRoot().createOrUpdateDocument(name, stream); }
/** * Set the contents of a document in the root directory, * creating if needed, otherwise updating * * @param stream the InputStream from which the document's data * will be obtained * @param name the name of the new or existing POIFSDocument * * @return the new or updated DocumentEntry * * @exception IOException on error populating the POIFSDocument */ @SuppressWarnings("UnusedReturnValue") public DocumentEntry createOrUpdateDocument(final InputStream stream, final String name) throws IOException { return getRoot().createOrUpdateDocument(name, stream); }