Home / Function/ testSerialization() — netty Function Reference

testSerialization() — netty Function Reference

Architecture documentation for the testSerialization() function in DefaultChannelIdTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  028cfa47_f085_9404_13ef_fd941992d64e["testSerialization()"]
  0daa1ce3_4bc0_db70_656c_f03cb2bebe1f["DefaultChannelIdTest"]
  028cfa47_f085_9404_13ef_fd941992d64e -->|defined in| 0daa1ce3_4bc0_db70_656c_f03cb2bebe1f
  style 028cfa47_f085_9404_13ef_fd941992d64e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/DefaultChannelIdTest.java lines 61–79

    @Test
    public void testSerialization() throws Exception {
        ChannelId a = DefaultChannelId.newInstance();
        ChannelId b;

        ByteBuf buf = Unpooled.buffer();
        try (ObjectOutputStream out = new ObjectOutputStream(new ByteBufOutputStream(buf))) {
            out.writeObject(a);
            out.flush();
        }

        try (ObjectInputStream in = new ObjectInputStream(new ByteBufInputStream(buf, true))) {
            b = (ChannelId) in.readObject();
        }

        assertEquals(a, b);
        assertNotSame(a, b);
        assertEquals(a.asLongText(), b.asLongText());
    }

Domain

Subdomains

Frequently Asked Questions

What does testSerialization() do?
testSerialization() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/DefaultChannelIdTest.java.
Where is testSerialization() defined?
testSerialization() is defined in transport/src/test/java/io/netty/channel/DefaultChannelIdTest.java at line 61.

Analyze Your Own Codebase

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

Try Supermodel Free