@@ -0,0 +1,884 @@
+package com.github.davidcarboni.restolino.helpers;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.InputStreamReader;%0Aimport java.io.UnsupportedEncodingException;%0A%0Apublic class DebugStreamReader extends InputStreamReader %7B%0A%0A%09public DebugStreamReader(InputStream in, String cs)%0A%09%09%09throws UnsupportedEncodingException %7B%0A%09%09super(in, cs);%0A%09%7D%0A%0A%09@Override%0A%09public int read() throws IOException %7B%0A%09%09int result = super.read();%0A%09%09System.out.print((char) result);%0A%09%09return result;%0A%09%7D%0A%0A%09@Override%0A%09public int read(char%5B%5D cbuf, int offset, int length) throws IOException %7B%0A%09%09int result = super.read(cbuf, offset, length);%0A%09%09for (int i = 0; i %3C length && i %3C cbuf.length; i++)%0A%09%09%09System.out.print(cbuf%5Bi%5D);%0A%09%09return result;%0A%09%7D%0A%0A%09@Override%0A%09public void close() throws IOException %7B%0A%09%09int c;%0A%09%09while ((c = read()) != -1)%0A%09%09%09System.out.print((char) c);%0A%09%09super.close();%0A%09%7D%0A%0A%7D%0A

Debug class.