Code example for PrintWriter

0
 */ 
final class GenericClientExceptionConverter implements ClientExceptionConverter { 
 
    public Object convert(Throwable t) {
        StringWriter s = new StringWriter();
        t.printStackTrace(new PrintWriter(s));
        return new GenericError(s.toString(), 0);
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE