Home / Function/ validateOffset() — netty Function Reference

validateOffset() — netty Function Reference

Architecture documentation for the validateOffset() function in Snappy.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9a397f72_75fb_a24a_1007_bc2bd8ca3feb["validateOffset()"]
  6a7984ff_ded6_5ba2_b4bb_f92d0d3986f8["Snappy"]
  9a397f72_75fb_a24a_1007_bc2bd8ca3feb -->|defined in| 6a7984ff_ded6_5ba2_b4bb_f92d0d3986f8
  02f1d546_5814_3353_a804_4d9f39591d0d["decodeCopyWith1ByteOffset()"]
  02f1d546_5814_3353_a804_4d9f39591d0d -->|calls| 9a397f72_75fb_a24a_1007_bc2bd8ca3feb
  5a991b7b_d13e_6b74_df07_e461641c7020["decodeCopyWith2ByteOffset()"]
  5a991b7b_d13e_6b74_df07_e461641c7020 -->|calls| 9a397f72_75fb_a24a_1007_bc2bd8ca3feb
  f1c4d3ee_834b_d5ad_b8b3_2d0617d38468["decodeCopyWith4ByteOffset()"]
  f1c4d3ee_834b_d5ad_b8b3_2d0617d38468 -->|calls| 9a397f72_75fb_a24a_1007_bc2bd8ca3feb
  style 9a397f72_75fb_a24a_1007_bc2bd8ca3feb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/main/java/io/netty/handler/codec/compression/Snappy.java lines 637–650

    private static void validateOffset(int offset, int chunkSizeSoFar) {
        if (offset == 0) {
            throw new DecompressionException("Offset is less than minimum permissible value");
        }

        if (offset < 0) {
            // Due to arithmetic overflow
            throw new DecompressionException("Offset is greater than maximum value supported by this implementation");
        }

        if (offset > chunkSizeSoFar) {
            throw new DecompressionException("Offset exceeds size of chunk");
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does validateOffset() do?
validateOffset() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Snappy.java.
Where is validateOffset() defined?
validateOffset() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Snappy.java at line 637.
What calls validateOffset()?
validateOffset() is called by 3 function(s): decodeCopyWith1ByteOffset, decodeCopyWith2ByteOffset, decodeCopyWith4ByteOffset.

Analyze Your Own Codebase

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

Try Supermodel Free