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

public Class DefaultDnsRecordEncoder

extends Object
implements DnsRecordEncoder
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.dns.DnsRecordEncoder
Annotations
@UnstableApi
Imports
io.netty.buffer.ByteBuf, io.netty.channel.socket.InternetProtocolFamily, io.netty.handler.codec.UnsupportedMessageTypeException, io.netty.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, ByteBuf
the output buffer where the encoded question will be written to
out
)

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

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

Implements io.netty.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, ByteBuf buf) throws Exception
encodeOptEcsRecordback to summary
private void encodeOptEcsRecord(DnsOptEcsRecord record, ByteBuf out) throws Exception
encodeOptPseudoRecordback to summary
private void encodeOptPseudoRecord(DnsOptPseudoRecord record, ByteBuf out) throws Exception
encodePtrRecordback to summary
private void encodePtrRecord(DnsPtrRecord record, ByteBuf out) throws Exception
encodeQuestionback to summary
public final void encodeQuestion(DnsQuestion question, ByteBuf out) throws Exception

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

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

Encodes a DnsQuestion.

Parameters
out:ByteBuf

the output buffer where the encoded question will be written to

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

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

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

Encodes a DnsRecord.

Parameters
out:ByteBuf

the output buffer where the encoded record will be written to

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