/** * Closes the underlying {@link POIFSFileSystem} from which * the document was read, if any. Has no effect on documents * opened from an InputStream, or newly created ones.<p> * * Once {@code close()} has been called, no further operations * should be called on the document. */ @Override public void close() throws IOException { if (directory != null) { if (directory.getNFileSystem() != null) { directory.getNFileSystem().close(); clearDirectory(); } } }
/** * Closes the underlying {@link POIFSFileSystem} from which * the document was read, if any. Has no effect on documents * opened from an InputStream, or newly created ones.<p> * * Once {@code close()} has been called, no further operations * should be called on the document. */ @Override public void close() throws IOException { if (directory != null) { if (directory.getNFileSystem() != null) { directory.getNFileSystem().close(); clearDirectory(); } } }