@Test public void testInValidTurtleOutput() throws IOException { InputStream rdfInput = TurtleRecordWriterTest.class.getClassLoader().getResourceAsStream(WRONG_TTL_INPUT_TEST); Assert.assertNotNull(rdfInput); try { Model jenaModel = ModelFactory.createDefaultModel().read(rdfInput, "", "Turtle"); Assert.assertTrue("Turtle fomat is invalid", jenaModel.isEmpty()); rdfInput.close(); } catch (RiotException e) { Assert.assertTrue( ! e.getMessage().isEmpty()); } }
@Override public void close(){ try { bufferedWriter.flush(); bufferedWriter.close(); } catch (IOException e) { LOG.error("Error closing the buffer writer ", e); } }
TurtleRecordWriter implements AutoCloseable { @Override public void close(){ try { bufferedWriter.flush(); bufferedWriter.close(); } catch (IOException e) { LOG.error("Error closing the buffer writer ", e); } } }
TurtleRecordWriter implements AutoCloseable { @Override public void close(){ try { bufferedWriter.flush(); bufferedWriter.close(); } catch (IOException e) { LOG.error("Error closing the buffer writer ", e); } } TurtleRecordWriter(OutputStream out); }
TurtleRecordWriter implements AutoCloseable { @Override public void close(){ try { bufferedWriter.flush(); bufferedWriter.close(); } catch (IOException e) { LOG.error("Error closing the buffer writer ", e); } } TurtleRecordWriter(OutputStream out); void write(Model m ); @Override void close(); }
TurtleRecordWriter implements AutoCloseable { @Override public void close(){ try { bufferedWriter.flush(); bufferedWriter.close(); } catch (IOException e) { LOG.error("Error closing the buffer writer ", e); } } TurtleRecordWriter(OutputStream out); void write(Model m ); @Override void close();  }