/** Create a buffered reader that uses UTF-8 encoding */ static public BufferedReader asBufferedUTF8(InputStream in) { BufferedReader r = new BufferedReader(asUTF8(in)) ; return r ; }
/** Create a print writer that uses UTF-8 encoding */ static public PrintWriter asPrintWriterUTF8(OutputStream out) { return new PrintWriter(asUTF8(out)); }
/** Create a buffered reader that uses UTF-8 encoding */ static public BufferedReader asBufferedUTF8(InputStream in) { BufferedReader r = new BufferedReader(asUTF8(in)) ; return r ; }
/** Create a print writer that uses UTF-8 encoding */ static public PrintWriter asPrintWriterUTF8(OutputStream out) { return new PrintWriter(asUTF8(out)); }
@Override public void read(Model model, InputStream in, String base) { // N-Triples must be in ASCII, we permit UTF-8. read(model, FileUtils.asUTF8(in), base); } @Override
/** Write out an XML serialization of a model. * @param model the model to be serialized * @param out the OutputStream to receive the serialization * @param base The URL at which the file will be placed. */ @Override final public void write(Model model, OutputStream out, String base) { write( model, FileUtils.asUTF8(out), base ); }
@Override public void read(Model model, InputStream in, String base) { // N-Triples must be in ASCII, we permit UTF-8. read(model, FileUtils.asUTF8(in), base); } @Override
public void parse(Graph graph, String baseURI, InputStream in) { Reader reader = FileUtils.asUTF8(in) ; parse(graph, baseURI, reader) ; }
/** Write out an XML serialization of a model. * @param model the model to be serialized * @param out the OutputStream to receive the serialization * @param base The URL at which the file will be placed. */ @Override final public void write(Model model, OutputStream out, String base) { write( model, FileUtils.asUTF8(out), base ); }
public void parse(Graph graph, String baseURI, InputStream in) { Reader reader = FileUtils.asUTF8(in) ; parse(graph, baseURI, reader) ; }
static protected BufferedReader makeReader(InputStream in) { return new BufferedReader(FileUtils.asUTF8(in)) ; } }
static protected BufferedReader makeReader(InputStream in) { return new BufferedReader(FileUtils.asUTF8(in)) ; } }
@Override public void write(Model model, OutputStream out, String base) { try { Writer w; try { w = new OutputStreamWriter(out, "ascii"); } catch (UnsupportedEncodingException e) { logger.warn( "ASCII is not supported: in NTripleWriter.write", e ); w = FileUtils.asUTF8(out); } write(model, w, base); w.flush(); } catch (Exception ioe) { errorHandler.error(ioe); } } @Override
@Override public void write(Model model, OutputStream out, String base) { try { Writer w; try { w = new OutputStreamWriter(out, "ascii"); } catch (UnsupportedEncodingException e) { logger.warn( "ASCII is not supported: in NTripleWriter.write", e ); w = FileUtils.asUTF8(out); } write(model, w, base); w.flush(); } catch (Exception ioe) { errorHandler.error(ioe); } } @Override
Writer w = FileUtils.asUTF8(out) ; NodeToLabelMap bnodes = new NodeToLabelMap() ; w = new BufferedWriter(w) ;