netty5/buffer
Nitesh Kant 4259db264f
Add an ByteBuf -> Buffer adaptor (#11518)
Add an ByteBuf -> Buffer adaptor

Motivation:

For migration of APIs from `ByteBuf` to `Buffer` sometime we may have to bridge APIs which use a `ByteBuf` (eg: `ByteToMessageDecoder` at the moment) to APIs that use a `Buffer` even when the allocator for the `ByteBuf` isn't migrated to use `ByteBufAllocatorAdaptor`.

Modification:

- Add a simple copy adaptor that copies all data from `ByteBuf` to a new `Buffer`.
- I noticed we do not have a `writeBytes` method with offsets, so added that too.

Result:

One more adaptor to bridge old and new buffer APIs.
2021-07-28 11:16:55 +02:00
..
src Add an ByteBuf -> Buffer adaptor (#11518) 2021-07-28 11:16:55 +02:00
pom.xml Use http in xmlns URIs to make maven release plugin happy again (#10788) 2020-11-10 10:51:05 +01:00