Home / Function/ contentLength() — netty Function Reference

contentLength() — netty Function Reference

Architecture documentation for the contentLength() function in AbstractMemcacheObjectEncoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  6c95b6ea_792a_d20a_be2e_c1e99bb857a8["contentLength()"]
  2483babf_38af_78d3_a690_99fb02b9904b["AbstractMemcacheObjectEncoder"]
  6c95b6ea_792a_d20a_be2e_c1e99bb857a8 -->|defined in| 2483babf_38af_78d3_a690_99fb02b9904b
  917cd8db_0206_e46f_4936_482a44106ce3["encode()"]
  917cd8db_0206_e46f_4936_482a44106ce3 -->|calls| 6c95b6ea_792a_d20a_be2e_c1e99bb857a8
  style 6c95b6ea_792a_d20a_be2e_c1e99bb857a8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-memcache/src/main/java/io/netty/handler/codec/memcache/AbstractMemcacheObjectEncoder.java lines 88–99

    private static int contentLength(Object msg) {
        if (msg instanceof MemcacheContent) {
            return ((MemcacheContent) msg).content().readableBytes();
        }
        if (msg instanceof ByteBuf) {
            return ((ByteBuf) msg).readableBytes();
        }
        if (msg instanceof FileRegion) {
            return (int) ((FileRegion) msg).count();
        }
        throw new IllegalStateException("unexpected message type: " + StringUtil.simpleClassName(msg));
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does contentLength() do?
contentLength() is a function in the netty codebase, defined in codec-memcache/src/main/java/io/netty/handler/codec/memcache/AbstractMemcacheObjectEncoder.java.
Where is contentLength() defined?
contentLength() is defined in codec-memcache/src/main/java/io/netty/handler/codec/memcache/AbstractMemcacheObjectEncoder.java at line 88.
What calls contentLength()?
contentLength() is called by 1 function(s): encode.

Analyze Your Own Codebase

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

Try Supermodel Free