static S readLineThroughUTF8Processor(UTF8Processor p, InputStream in) ctex { new StringBuilder input; bool hasLine = false; while (!hasLine) { int available=in.available(); if (available==0) break; byte b[]=new byte[available]; in.read(b); for i to available: { S s = p.processByte(b[i]); if (nempty(s)) { input.append(s); if (s.equals("\n")) hasLine = true; } } } ret input.toString(); }