This commit is contained in:
Andrea Cavalli 2021-09-04 02:18:49 +02:00
parent 0a8709ac3f
commit 033d4995f8
4 changed files with 18 additions and 15 deletions

View File

@ -75,13 +75,16 @@
* type.
* <pre>
* // The composite type is compatible with the component type.
* {@link io.netty5.buffer.ByteBuf} message = {@link io.netty5.buffer.Unpooled}.wrappedBuffer(header, body);
* {@link io.netty5.buffer.ByteBuf} message
* = {@link io.netty5.buffer.Unpooled}.wrappedBuffer(header, body);
*
* // Therefore, you can even create a composite by mixing a composite and an
* // ordinary buffer.
* {@link io.netty5.buffer.ByteBuf} messageWithFooter = {@link io.netty5.buffer.Unpooled}.wrappedBuffer(message, footer);
* {@link io.netty5.buffer.ByteBuf} messageWithFooter
* = {@link io.netty5.buffer.Unpooled}.wrappedBuffer(message, footer);
*
* // Because the composite is still a {@link io.netty5.buffer.ByteBuf}, you can access its content
* // Because the composite is still
* a {@link io.netty5.buffer.ByteBuf}, you can access its content
* // easily, and the accessor method will behave just like it's a single buffer
* // even if the region you want to access spans over multiple components. The
* // unsigned integer being read here is located across body and footer.