Home / Function/ encode() — netty Function Reference

encode() — netty Function Reference

Architecture documentation for the encode() function in CompatibleMarshallingEncoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0c04abc7_7ee9_0fd6_aa7a_05e8312e3536["encode()"]
  337fe5ad_a8e2_ef19_f18b_966ce0b844e4["CompatibleMarshallingEncoder"]
  0c04abc7_7ee9_0fd6_aa7a_05e8312e3536 -->|defined in| 337fe5ad_a8e2_ef19_f18b_966ce0b844e4
  style 0c04abc7_7ee9_0fd6_aa7a_05e8312e3536 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-marshalling/src/main/java/io/netty/handler/codec/marshalling/CompatibleMarshallingEncoder.java lines 51–58

    @Override
    protected void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) throws Exception {
        Marshaller marshaller = provider.getMarshaller(ctx);
        marshaller.start(new ChannelBufferByteOutput(out));
        marshaller.writeObject(msg);
        marshaller.finish();
        marshaller.close();
    }

Domain

Subdomains

Frequently Asked Questions

What does encode() do?
encode() is a function in the netty codebase, defined in codec-marshalling/src/main/java/io/netty/handler/codec/marshalling/CompatibleMarshallingEncoder.java.
Where is encode() defined?
encode() is defined in codec-marshalling/src/main/java/io/netty/handler/codec/marshalling/CompatibleMarshallingEncoder.java at line 51.

Analyze Your Own Codebase

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

Try Supermodel Free