Home / Function/ utf8ByteCount() — netty Function Reference

utf8ByteCount() — netty Function Reference

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

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  e5a26d38_968d_e748_84db_676493308e82["utf8ByteCount()"]
  920454f6_25f6_4a9b_3d32_9684c3e11f6c["ByteBufUtil"]
  e5a26d38_968d_e748_84db_676493308e82 -->|defined in| 920454f6_25f6_4a9b_3d32_9684c3e11f6c
  da4d1009_022d_138b_655b_c0eb7ea1cc55["utf8Bytes()"]
  da4d1009_022d_138b_655b_c0eb7ea1cc55 -->|calls| e5a26d38_968d_e748_84db_676493308e82
  0da47e3d_b4bd_90e4_3000_aca6d4e3cd1d["utf8BytesNonAscii()"]
  e5a26d38_968d_e748_84db_676493308e82 -->|calls| 0da47e3d_b4bd_90e4_3000_aca6d4e3cd1d
  style e5a26d38_968d_e748_84db_676493308e82 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/ByteBufUtil.java lines 1179–1190

    private static int utf8ByteCount(final CharSequence seq, int start, int end) {
        if (seq instanceof AsciiString) {
            return end - start;
        }
        int i = start;
        // ASCII fast path
        while (i < end && seq.charAt(i) < 0x80) {
            ++i;
        }
        // !ASCII is packed in a separate method to let the ASCII case be smaller
        return i < end ? (i - start) + utf8BytesNonAscii(seq, i, end) : i - start;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free