Exemplo n.º 1
0
 /**
  * Write the model out in N3. The writer should be one suitable for UTF-8 which excludes a
  * PrintWriter or a FileWriter which use default character set.
  *
  * <p>Examples:
  *
  * <pre>
  * try {
  *      Writer w =  new BufferedWriter(new OutputStreamWriter(output, "UTF-8")) ;
  *      model.write(w, base) ;
  *      try { w.flush() ; } catch (IOException ioEx) {}
  *  } catch (java.io.UnsupportedEncodingException ex) {} //UTF-8 is required so can't happen
  * </pre>
  *
  * or
  *
  * <pre>
  * try {
  *     OutputStream out = new FileOutputStream(file) ;
  *     Writer w =  new BufferedWriter(new OutputStreamWriter(out, "UTF-8")) ;
  *     model.write(w, base) ;
  * }
  * catch (java.io.UnsupportedEncodingException ex) {}
  * catch (java.io.FileNotFoundException noFileEx) { ... }
  * </pre>
  *
  * @see #write(Model,Writer,String)
  */
 public void write(Model model, OutputStream out, String base) {
   writer.write(model, out, base);
 }
Exemplo n.º 2
0
 /**
  * Write the model out in N3, encoded in in UTF-8
  *
  * @see #write(Model,Writer,String)
  */
 public void write(Model model, Writer out, String base) {
   writer.write(model, out, base);
 }