Decoder { public Decoder(Charset charset, Consumer<int[]> onChar) { this(4, charset, onChar); } Decoder(Charset charset, Consumer<int[]> onChar);  Decoder(int initialSize, Charset charset, Consumer<int[]> onChar); void setCharset(Charset charset); void write(byte[] data); void write(byte[] data, int start, int len); void setConsumer(Consumer<int[]> inputHandler);  }
@Test public void testDecoder() { assertDecode(4, Arrays.asList("ABCD","E"), 65, 66, 67, 68, 69); assertDecode(4, Arrays.asList("\rfoo"), 13, 102, 111, 111); assertDecode(4, Arrays.asList("\u001B["), 27, 91); }