Home / Function/ ByteBuf() — netty Function Reference

ByteBuf() — netty Function Reference

Architecture documentation for the ByteBuf() function in SlicedByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  773e162e_7489_1955_fc11_f09a030db541["ByteBuf()"]
  d2003ad7_9c00_dcea_c98f_30ea8ee049f1["SlicedByteBufTest"]
  773e162e_7489_1955_fc11_f09a030db541 -->|defined in| d2003ad7_9c00_dcea_c98f_30ea8ee049f1
  style 773e162e_7489_1955_fc11_f09a030db541 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/SlicedByteBufTest.java lines 36–46

    @Override
    protected final ByteBuf newBuffer(int length, int maxCapacity) {
        Assumptions.assumeTrue(maxCapacity == Integer.MAX_VALUE);
        int offset;
        offset = length == 0 ? 0 : ThreadLocalRandom.current().nextInt(length);
        ByteBuf buffer = Unpooled.buffer(length * 2);
        ByteBuf slice = newSlice(buffer, offset, length);
        assertEquals(0, slice.readerIndex());
        assertEquals(length, slice.writerIndex());
        return slice;
    }

Domain

Subdomains

Frequently Asked Questions

What does ByteBuf() do?
ByteBuf() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/SlicedByteBufTest.java.
Where is ByteBuf() defined?
ByteBuf() is defined in buffer/src/test/java/io/netty/buffer/SlicedByteBufTest.java at line 36.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free