1 5 6 package com.hp.hpl.jena.n3; 7 import java.io.*; 8 import com.hp.hpl.jena.util.FileUtils ; 9 11 12 16 public class N3ErrorPrinter extends NullN3EventHandler 17 { 18 PrintWriter out = null; 19 20 public N3ErrorPrinter(OutputStream _out) 21 { 22 out = FileUtils.asPrintWriterUTF8(_out) ; 23 } 24 25 28 29 public N3ErrorPrinter(PrintWriter _out) 30 { 31 out = _out; 32 } 33 34 public void error(Exception ex, String message) { println("Error: "+message) ; flush() ; } 35 38 private void print(String s) { out.print(s) ; } 39 private void println(String s) { out.println() ; } 40 private void println() { out.println() ; } 41 private void flush() { out.flush() ; } 42 } 43 44 70 | Popular Tags |