@Converter
    public static InputStream toInputStream(IoBuffer buffer) {
        return buffer.asInputStream();
    }
@Test
    public void testToInputStream() throws Exception {
        byte[] in = "Hello World".getBytes();
        IoBuffer bb = IoBuffer.wrap(in);

        try (InputStream is = MinaConverter.toInputStream(bb)) {
            for (byte b : in) {
                int out = is.read();
                assertEquals(b, out);
            }
        }
    }