@Test public final void testSaveWriterWithException() throws IOException { final OutputStream outputStream = PowerMock.createMock(OutputStream.class); PowerMock.resetAll(); TestHelper.initMockDocument(this.odsElements); this.odsElements .createEmptyElements(EasyMock.eq(this.xmlUtil), EasyMock.isA(ZipUTF8Writer.class)); this.odsElements .writeMimeType(EasyMock.eq(this.xmlUtil), EasyMock.isA(ZipUTF8Writer.class)); this.odsElements.writeMeta(EasyMock.eq(this.xmlUtil), EasyMock.isA(ZipUTF8Writer.class)); this.odsElements.writeStyles(EasyMock.eq(this.xmlUtil), EasyMock.isA(ZipUTF8Writer.class)); this.odsElements.writeContent(EasyMock.eq(this.xmlUtil), EasyMock.isA(ZipUTF8Writer.class)); this.odsElements .writeSettings(EasyMock.eq(this.xmlUtil), EasyMock.isA(ZipUTF8Writer.class)); this.odsElements.writeExtras(EasyMock.eq(this.xmlUtil), EasyMock.isA(ZipUTF8Writer.class)); outputStream.write(EasyMock.isA(byte[].class), EasyMock.anyInt(), EasyMock.anyInt()); EasyMock.expectLastCall().anyTimes(); outputStream.flush(); EasyMock.expectLastCall().anyTimes(); outputStream.close(); PowerMock.replayAll(); final AnonymousOdsDocument document = this.getAnonymousDocument(); try { new AnonymousOdsFileWriter(this.logger, document).save(outputStream); } finally { outputStream.close(); } PowerMock.verifyAll(); }
public void save(final OutputStream out) throws IOException { final ZipUTF8Writer writer = ZipUTF8WriterImpl.builder().build(out); this.save(writer); writer.finish(); writer.flush(); }
AnonymousOdsFileWriter { public void save(final OutputStream out) throws IOException { final ZipUTF8Writer writer = ZipUTF8WriterImpl.builder().build(out); this.save(writer); writer.finish(); writer.flush(); } }
AnonymousOdsFileWriter { public void save(final OutputStream out) throws IOException { final ZipUTF8Writer writer = ZipUTF8WriterImpl.builder().build(out); this.save(writer); writer.finish(); writer.flush(); } AnonymousOdsFileWriter(final Logger logger, final AnonymousOdsDocument document); }
AnonymousOdsFileWriter { public void save(final OutputStream out) throws IOException { final ZipUTF8Writer writer = ZipUTF8WriterImpl.builder().build(out); this.save(writer); writer.finish(); writer.flush(); } AnonymousOdsFileWriter(final Logger logger, final AnonymousOdsDocument document); OdsDocument document(); void save(final OutputStream out); @Deprecated void save(final OutputStream out, final ZipUTF8WriterBuilderImpl builder); void save(final ZipUTF8Writer writer); void saveAs(final String filename); void saveAs(final File file); void saveAs(final String filename, final ZipUTF8WriterBuilder builder); void saveAs(final File file, final ZipUTF8WriterBuilder builder); }
AnonymousOdsFileWriter { public void save(final OutputStream out) throws IOException { final ZipUTF8Writer writer = ZipUTF8WriterImpl.builder().build(out); this.save(writer); writer.finish(); writer.flush(); } AnonymousOdsFileWriter(final Logger logger, final AnonymousOdsDocument document); OdsDocument document(); void save(final OutputStream out); @Deprecated void save(final OutputStream out, final ZipUTF8WriterBuilderImpl builder); void save(final ZipUTF8Writer writer); void saveAs(final String filename); void saveAs(final File file); void saveAs(final String filename, final ZipUTF8WriterBuilder builder); void saveAs(final File file, final ZipUTF8WriterBuilder builder);  }