Home / Function/ unrolledLastIndexOf() — netty Function Reference

unrolledLastIndexOf() — netty Function Reference

Architecture documentation for the unrolledLastIndexOf() function in ByteBufUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  eec154fb_8b13_48f3_3735_b609819320b4["unrolledLastIndexOf()"]
  920454f6_25f6_4a9b_3d32_9684c3e11f6c["ByteBufUtil"]
  eec154fb_8b13_48f3_3735_b609819320b4 -->|defined in| 920454f6_25f6_4a9b_3d32_9684c3e11f6c
  e9312b0e_c5cc_d3d1_73a9_ba37fd8c6bb4["lastIndexOf()"]
  e9312b0e_c5cc_d3d1_73a9_ba37fd8c6bb4 -->|calls| eec154fb_8b13_48f3_3735_b609819320b4
  style eec154fb_8b13_48f3_3735_b609819320b4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/ByteBufUtil.java lines 764–810

    private static int unrolledLastIndexOf(final AbstractByteBuf buffer, final int fromIndex, final int byteCount,
                                           final byte value) {
        assert byteCount >= 0 && byteCount < 8;
        if (byteCount == 0) {
            return -1;
        }
        if (buffer._getByte(fromIndex - 1) == value) {
            return fromIndex - 1;
        }
        if (byteCount == 1) {
            return -1;
        }
        if (buffer._getByte(fromIndex - 2) == value) {
            return fromIndex - 2;
        }
        if (byteCount == 2) {
            return -1;
        }
        if (buffer._getByte(fromIndex - 3) == value) {
            return fromIndex - 3;
        }
        if (byteCount == 3) {
            return -1;
        }
        if (buffer._getByte(fromIndex - 4) == value) {
            return fromIndex - 4;
        }
        if (byteCount == 4) {
            return -1;
        }
        if (buffer._getByte(fromIndex - 5) == value) {
            return fromIndex - 5;
        }
        if (byteCount == 5) {
            return -1;
        }
        if (buffer._getByte(fromIndex - 6) == value) {
            return fromIndex - 6;
        }
        if (byteCount == 6) {
            return -1;
        }
        if (buffer._getByte(fromIndex - 7) == value) {
            return fromIndex - 7;
        }
        return -1;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does unrolledLastIndexOf() do?
unrolledLastIndexOf() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/ByteBufUtil.java.
Where is unrolledLastIndexOf() defined?
unrolledLastIndexOf() is defined in buffer/src/main/java/io/netty/buffer/ByteBufUtil.java at line 764.
What calls unrolledLastIndexOf()?
unrolledLastIndexOf() is called by 1 function(s): lastIndexOf.

Analyze Your Own Codebase

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

Try Supermodel Free