String s2 = "9\r\n6\r\nabcdef\r\n0\r\n\r\n";
ReadableByteChannel channel = new ReadableByteChannelMockup(
new String[] {s1, s2}, "US-ASCII");
HttpParams params = new BasicHttpParams();
SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params);
HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
ByteBuffer dst = ByteBuffer.allocate(1024);
ByteBuffer tmp = ByteBuffer.allocate(4);