Top Description Fields Constructors Methods
io.netty5.handler.codec.dns

public Class DefaultDnsRecordEncoder

extends Object
implements DnsRecordEncoder
Class Inheritance
All Implemented Interfaces
io.netty5.handler.codec.dns.DnsRecordEncoder
Annotations
@UnstableApi
Imports
io.netty5.buffer.Buffer, io.netty5.channel.socket.SocketProtocolFamily, io.netty5.handler.codec.UnsupportedMessageTypeException, io.netty5.util.internal.StringUtil, .UnstableApi

The default DnsRecordEncoder implementation.
See Also
DefaultDnsRecordDecoder

Field Summary

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
protected
DefaultDnsRecordEncoder()

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
pack-priv static int
calculateEcsAddressLength(int sourcePrefixLength, int lowOrderBitsToPreserve)

protected void
private void
private void
private void
public final void
encodeQuestion(DnsQuestion question, Buffer
the output buffer where the encoded question will be written to
out
)

Implements io.netty5.handler.codec.dns.DnsRecordEncoder.encodeQuestion.

Encodes a DnsQuestion.
private void
public void
encodeRecord(DnsRecord record, Buffer
the output buffer where the encoded record will be written to
out
)

Implements io.netty5.handler.codec.dns.DnsRecordEncoder.encodeRecord.

Encodes a DnsRecord.
private void
private static byte
padWithZeros(byte b, int lowOrderBitsToPreserve)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

PREFIX_MASKback to summary
private static final int PREFIX_MASK

Constructor Detail

DefaultDnsRecordEncoderback to summary
protected DefaultDnsRecordEncoder()

Creates a new instance.

Method Detail

calculateEcsAddressLengthback to summary
pack-priv static int calculateEcsAddressLength(int sourcePrefixLength, int lowOrderBitsToPreserve)
encodeNameback to summary
protected void encodeName(String name, Buffer buf) throws Exception
encodeOptEcsRecordback to summary
private void encodeOptEcsRecord(DnsOptEcsRecord record, Buffer out) throws Exception
encodeOptPseudoRecordback to summary
private void encodeOptPseudoRecord(DnsOptPseudoRecord record, Buffer out) throws Exception
encodePtrRecordback to summary
private void encodePtrRecord(DnsPtrRecord record, Buffer out) throws Exception
encodeQuestionback to summary
public final void encodeQuestion(DnsQuestion question, Buffer out) throws Exception

Implements io.netty5.handler.codec.dns.DnsRecordEncoder.encodeQuestion.

Doc from io.netty5.handler.codec.dns.DnsRecordEncoder.encodeQuestion.

Encodes a DnsQuestion.

Parameters
out:Buffer

the output buffer where the encoded question will be written to

Annotations
@Override
encodeRawRecordback to summary
private void encodeRawRecord(DnsRawRecord record, Buffer out) throws Exception
encodeRecordback to summary
public void encodeRecord(DnsRecord record, Buffer out) throws Exception

Implements io.netty5.handler.codec.dns.DnsRecordEncoder.encodeRecord.

Doc from io.netty5.handler.codec.dns.DnsRecordEncoder.encodeRecord.

Encodes a DnsRecord.

Parameters
out:Buffer

the output buffer where the encoded record will be written to

Annotations
@Override
encodeRecord0back to summary
private void encodeRecord0(DnsRecord record, Buffer out) throws Exception
padWithZerosback to summary
private static byte padWithZeros(byte b, int lowOrderBitsToPreserve)