@Test void testClose() throws IOException { xlsxWriter.close(); verify(workbook).close(); }
@Override public void close() throws IOException { try { workbook.write(Files.newOutputStream(target)); } catch (RuntimeException e) { throw new XlsxWriterException(e); } finally { workbook.close(); } }
XlsxWriter implements AutoCloseable { @Override public void close() throws IOException { try { workbook.write(Files.newOutputStream(target)); } catch (RuntimeException e) { throw new XlsxWriterException(e); } finally { workbook.close(); } } }
XlsxWriter implements AutoCloseable { @Override public void close() throws IOException { try { workbook.write(Files.newOutputStream(target)); } catch (RuntimeException e) { throw new XlsxWriterException(e); } finally { workbook.close(); } } XlsxWriter(Path target, Workbook workbook); }
XlsxWriter implements AutoCloseable { @Override public void close() throws IOException { try { workbook.write(Files.newOutputStream(target)); } catch (RuntimeException e) { throw new XlsxWriterException(e); } finally { workbook.close(); } } XlsxWriter(Path target, Workbook workbook); boolean hasSheet(String name); void createSheet(String name, List<Object> headers); void writeRows(Stream<List<Object>> rows, String sheetName); @Override void close(); }
XlsxWriter implements AutoCloseable { @Override public void close() throws IOException { try { workbook.write(Files.newOutputStream(target)); } catch (RuntimeException e) { throw new XlsxWriterException(e); } finally { workbook.close(); } } XlsxWriter(Path target, Workbook workbook); boolean hasSheet(String name); void createSheet(String name, List<Object> headers); void writeRows(Stream<List<Object>> rows, String sheetName); @Override void close();  }