[
https://issues.apache.org/jira/browse/JENA-517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13744841#comment-13744841
]
Andy Seaborne commented on JENA-517:
------------------------------------
N3IndentedWriter is old code. There is new, better writer in RIOT (which
because in ARQ because it works with dataset formats as well).
Would I be right in assuming you are using jena-core without jena-arq on the
classpath? If that is not the case, how are you managing to call it because
initialization is supposed to wire in the new writer.
> Unhandled IOException during model write to OutputStream
> --------------------------------------------------------
>
> Key: JENA-517
> URL: https://issues.apache.org/jira/browse/JENA-517
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.10.1
> Reporter: Knut-Olav Hoven
>
> Method "N3JenaWriterCommon.write()" silently ignores IOException from
> Writer.flush() while writing a model to an OutputStream.
> This might lead to debugging nightmares.
> Should at the very least throw some runtime exception wrapping the original
> exception :)
> {code}
> @Override
> public synchronized void write(Model model, OutputStream output, String
> base)
> {
> try {
> Writer w = new BufferedWriter(new
> OutputStreamWriter(output, "UTF-8")) ;
> write(model, w, base) ;
> try { w.flush() ; } catch (IOException ioEx) {}
> } catch (java.io.UnsupportedEncodingException ex)
> {
> System.err.println("Failed to create UTF-8 writer") ;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira