Home / Function/ testForEachByteDesc2() — netty Function Reference

testForEachByteDesc2() — netty Function Reference

Architecture documentation for the testForEachByteDesc2() function in AbstractByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  1fc0bfe9_f33f_b555_34c8_7961917d8432["testForEachByteDesc2()"]
  6540f2d1_cdad_6705_dd1d_9a24e2e53242["AbstractByteBufTest"]
  1fc0bfe9_f33f_b555_34c8_7961917d8432 -->|defined in| 6540f2d1_cdad_6705_dd1d_9a24e2e53242
  8a937a41_8149_af3c_cc53_a4bb2a5522fa["process()"]
  1fc0bfe9_f33f_b555_34c8_7961917d8432 -->|calls| 8a937a41_8149_af3c_cc53_a4bb2a5522fa
  style 1fc0bfe9_f33f_b555_34c8_7961917d8432 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java lines 5915–5936

    @Test
    public void testForEachByteDesc2() {
        byte[] expected = {1, 2, 3, 4};
        ByteBuf buf = newBuffer(expected.length);
        try {
            buf.writeBytes(expected);
            final byte[] bytes = new byte[expected.length];
            int i = buf.forEachByteDesc(new ByteProcessor() {
                private int index = bytes.length - 1;

                @Override
                public boolean process(byte value) throws Exception {
                    bytes[index--] = value;
                    return true;
                }
            });
            assertEquals(-1, i);
            assertArrayEquals(expected, bytes);
        } finally {
            buf.release();
        }
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testForEachByteDesc2() do?
testForEachByteDesc2() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java.
Where is testForEachByteDesc2() defined?
testForEachByteDesc2() is defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java at line 5915.
What does testForEachByteDesc2() call?
testForEachByteDesc2() calls 1 function(s): process.

Analyze Your Own Codebase

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

Try Supermodel Free