Home / Function/ testDecodePtrRecord() — netty Function Reference

testDecodePtrRecord() — netty Function Reference

Architecture documentation for the testDecodePtrRecord() function in DefaultDnsRecordDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5882db57_4e67_eebd_2da2_ca6b17580dbc["testDecodePtrRecord()"]
  818a470d_46ea_7cd1_0f64_8b71e08f0a90["DefaultDnsRecordDecoderTest"]
  5882db57_4e67_eebd_2da2_ca6b17580dbc -->|defined in| 818a470d_46ea_7cd1_0f64_8b71e08f0a90
  style 5882db57_4e67_eebd_2da2_ca6b17580dbc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-dns/src/test/java/io/netty/handler/codec/dns/DefaultDnsRecordDecoderTest.java lines 74–92

    @Test
    public void testDecodePtrRecord() throws Exception {
        DefaultDnsRecordDecoder decoder = new DefaultDnsRecordDecoder();
        ByteBuf buffer = Unpooled.buffer().writeByte(0);
        int readerIndex = buffer.readerIndex();
        int writerIndex = buffer.writerIndex();
        try {
            DnsPtrRecord record = (DnsPtrRecord) decoder.decodeRecord(
                    "netty.io", DnsRecordType.PTR, DnsRecord.CLASS_IN, 60, buffer, 0, 1);
            assertEquals("netty.io.", record.name());
            assertEquals(DnsRecord.CLASS_IN, record.dnsClass());
            assertEquals(60, record.timeToLive());
            assertEquals(DnsRecordType.PTR, record.type());
            assertEquals(readerIndex, buffer.readerIndex());
            assertEquals(writerIndex, buffer.writerIndex());
        } finally {
            buffer.release();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testDecodePtrRecord() do?
testDecodePtrRecord() is a function in the netty codebase, defined in codec-dns/src/test/java/io/netty/handler/codec/dns/DefaultDnsRecordDecoderTest.java.
Where is testDecodePtrRecord() defined?
testDecodePtrRecord() is defined in codec-dns/src/test/java/io/netty/handler/codec/dns/DefaultDnsRecordDecoderTest.java at line 74.

Analyze Your Own Codebase

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

Try Supermodel Free