Home / Function/ testFragmentedUnmarshalling() — netty Function Reference

testFragmentedUnmarshalling() — netty Function Reference

Architecture documentation for the testFragmentedUnmarshalling() function in AbstractCompatibleMarshallingDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b8970f44_701a_7f73_4a85_fd7d13f41ee6["testFragmentedUnmarshalling()"]
  62eb7f35_69a6_94a1_2fa1_27bfbab3c2c9["AbstractCompatibleMarshallingDecoderTest"]
  b8970f44_701a_7f73_4a85_fd7d13f41ee6 -->|defined in| 62eb7f35_69a6_94a1_2fa1_27bfbab3c2c9
  style b8970f44_701a_7f73_4a85_fd7d13f41ee6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-marshalling/src/test/java/io/netty/handler/codec/marshalling/AbstractCompatibleMarshallingDecoderTest.java lines 70–98

    @Test
    public void testFragmentedUnmarshalling() throws IOException {
        MarshallerFactory marshallerFactory = createMarshallerFactory();
        MarshallingConfiguration configuration = createMarshallingConfig();

        EmbeddedChannel ch = new EmbeddedChannel(createDecoder(Integer.MAX_VALUE));

        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        Marshaller marshaller = marshallerFactory.createMarshaller(configuration);
        marshaller.start(Marshalling.createByteOutput(bout));
        marshaller.writeObject(testObject);
        marshaller.finish();
        marshaller.close();

        byte[] testBytes = bout.toByteArray();

        ByteBuf buffer = input(testBytes);
        ByteBuf slice = buffer.readRetainedSlice(2);

        ch.writeInbound(slice);
        ch.writeInbound(buffer);
        assertTrue(ch.finish());

        String unmarshalled = ch.readInbound();

        assertEquals(testObject, unmarshalled);

        assertNull(ch.readInbound());
    }

Domain

Subdomains

Frequently Asked Questions

What does testFragmentedUnmarshalling() do?
testFragmentedUnmarshalling() is a function in the netty codebase, defined in codec-marshalling/src/test/java/io/netty/handler/codec/marshalling/AbstractCompatibleMarshallingDecoderTest.java.
Where is testFragmentedUnmarshalling() defined?
testFragmentedUnmarshalling() is defined in codec-marshalling/src/test/java/io/netty/handler/codec/marshalling/AbstractCompatibleMarshallingDecoderTest.java at line 70.

Analyze Your Own Codebase

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

Try Supermodel Free