public void initPOIFSFileSystem() throws IOException { if (getBuffer()!=null) { //fs = new POIFSFileSystem( org.docx4j.utils.BufferUtil.newInputStream(bb) ); // the above seems to be calling methods which aren't implemented, // so, for now, brute force.. log.info("initing POIFSFileSystem from existing data"); ByteArrayInputStream bais = new ByteArrayInputStream(this.getBytes()); fs = new POIFSFileSystem(bais); } else { log.info("creating new empty POIFSFileSystem"); fs = new POIFSFileSystem(); writePOIFSFileSystem(); } }
public void initPOIFSFileSystem() throws IOException { if (getBuffer()!=null) { //fs = new POIFSFileSystem( org.docx4j.utils.BufferUtil.newInputStream(bb) ); // the above seems to be calling methods which aren't implemented, // so, for now, brute force.. log.info("initing POIFSFileSystem from existing data"); ByteArrayInputStream bais = new ByteArrayInputStream(this.getBytes()); fs = new POIFSFileSystem(bais); } else { log.info("creating new empty POIFSFileSystem"); fs = new POIFSFileSystem(); writePOIFSFileSystem(); } }