Home / Function/ isValidIpV4Word() — netty Function Reference

isValidIpV4Word() — netty Function Reference

Architecture documentation for the isValidIpV4Word() function in NetUtil.java from the netty codebase.

Function java CommonUtil Logging calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  f668324c_fd5c_4354_3f91_248cdec098d2["isValidIpV4Word()"]
  40fb3f7d_c2dd_316b_f965_bdef8e0dad94["NetUtil"]
  f668324c_fd5c_4354_3f91_248cdec098d2 -->|defined in| 40fb3f7d_c2dd_316b_f965_bdef8e0dad94
  f5782167_2420_ff99_4480_b2d1e67eedd2["isValidIpV4Address()"]
  f5782167_2420_ff99_4480_b2d1e67eedd2 -->|calls| f668324c_fd5c_4354_3f91_248cdec098d2
  d3717d99_c871_d483_1086_003435fef5bb["isValidIpV4Address0()"]
  d3717d99_c871_d483_1086_003435fef5bb -->|calls| f668324c_fd5c_4354_3f91_248cdec098d2
  3aae2752_d601_a5dd_3b06_fd014179e854["isValidNumericChar()"]
  f668324c_fd5c_4354_3f91_248cdec098d2 -->|calls| 3aae2752_d601_a5dd_3b06_fd014179e854
  style f668324c_fd5c_4354_3f91_248cdec098d2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/NetUtil.java lines 574–587

    private static boolean isValidIpV4Word(CharSequence word, int from, int toExclusive) {
        int len = toExclusive - from;
        char c0, c1, c2;
        if (len < 1 || len > 3 || (c0 = word.charAt(from)) < '0') {
            return false;
        }
        if (len == 3) {
            return (c1 = word.charAt(from + 1)) >= '0' &&
                   (c2 = word.charAt(from + 2)) >= '0' &&
                   (c0 <= '1' && c1 <= '9' && c2 <= '9' ||
                    c0 == '2' && c1 <= '5' && (c2 <= '5' || c1 < '5' && c2 <= '9'));
        }
        return c0 <= '9' && (len == 1 || isValidNumericChar(word.charAt(from + 1)));
    }

Domain

Subdomains

Frequently Asked Questions

What does isValidIpV4Word() do?
isValidIpV4Word() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/NetUtil.java.
Where is isValidIpV4Word() defined?
isValidIpV4Word() is defined in common/src/main/java/io/netty/util/NetUtil.java at line 574.
What does isValidIpV4Word() call?
isValidIpV4Word() calls 1 function(s): isValidNumericChar.
What calls isValidIpV4Word()?
isValidIpV4Word() is called by 2 function(s): isValidIpV4Address, isValidIpV4Address0.

Analyze Your Own Codebase

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

Try Supermodel Free