Home / Function/ testForEachByte2() — netty Function Reference

testForEachByte2() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java lines 5938–5959

    @Test
    public void testForEachByte2() {
        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.forEachByte(new ByteProcessor() {
                private int index;

                @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 testForEachByte2() do?
testForEachByte2() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java.
Where is testForEachByte2() defined?
testForEachByte2() is defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java at line 5938.
What does testForEachByte2() call?
testForEachByte2() 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