@Test public void readableNioBuffers_worksWithNormal() { ByteBuf buf = alloc.buffer(1).writeByte('a'); try (BufUnwrapper unwrapper = new BufUnwrapper()) { ByteBuffer[] internalBufs = unwrapper.readableNioBuffers(buf); Truth.assertThat(internalBufs).hasLength(1); assertEquals('a', internalBufs[0].get(0)); } finally { buf.release(); } }
ByteBuffer[] readableNioBuffers(ByteBuf buf) { return nioBuffers(buf, singleReadBuffer); }
BufUnwrapper implements AutoCloseable { ByteBuffer[] readableNioBuffers(ByteBuf buf) { return nioBuffers(buf, singleReadBuffer); } }
BufUnwrapper implements AutoCloseable { ByteBuffer[] readableNioBuffers(ByteBuf buf) { return nioBuffers(buf, singleReadBuffer); }  }
BufUnwrapper implements AutoCloseable { ByteBuffer[] readableNioBuffers(ByteBuf buf) { return nioBuffers(buf, singleReadBuffer); }  @Override void close(); }
BufUnwrapper implements AutoCloseable { ByteBuffer[] readableNioBuffers(ByteBuf buf) { return nioBuffers(buf, singleReadBuffer); }  @Override void close();  }