/** * Write any changes which have been made to POIFSFileSystem, * to the underlying ByteBuffer. This is necessary if the changes * are to be persisted. * * @throws IOException */ public void writePOIFSFileSystem() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); getFs().writeFilesystem(baos); // Need to put this is bb byte[] bytes = baos.toByteArray(); // java.nio.ByteBuffer bb contains the data setBinaryData( ByteBuffer.wrap(bytes) ); }
/** * Write any changes which have been made to POIFSFileSystem, * to the underlying ByteBuffer. This is necessary if the changes * are to be persisted. * * @throws IOException */ public void writePOIFSFileSystem() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); getFs().writeFilesystem(baos); // Need to put this is bb byte[] bytes = baos.toByteArray(); // java.nio.ByteBuffer bb contains the data setBinaryData( ByteBuffer.wrap(bytes) ); }