Package io.netty.handler.codec.dns
Class DefaultDnsRecordEncoder
java.lang.Object
io.netty.handler.codec.dns.DefaultDnsRecordEncoder
- All Implemented Interfaces:
DnsRecordEncoder
The default
DnsRecordEncoder implementation.- See Also:
-
Field Summary
FieldsFields inherited from interface io.netty.handler.codec.dns.DnsRecordEncoder
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static intcalculateEcsAddressLength(int sourcePrefixLength, int lowOrderBitsToPreserve) protected voidencodeName(String name, ByteBuf buf) private voidencodeOptEcsRecord(DnsOptEcsRecord record, ByteBuf out) private voidencodeOptPseudoRecord(DnsOptPseudoRecord record, ByteBuf out) private voidencodePtrRecord(DnsPtrRecord record, ByteBuf out) final voidencodeQuestion(DnsQuestion question, ByteBuf out) Encodes aDnsQuestion.private voidencodeRawRecord(DnsRawRecord record, ByteBuf out) voidencodeRecord(DnsRecord record, ByteBuf out) Encodes aDnsRecord.private voidencodeRecord0(DnsRecord record, ByteBuf out) private static bytepadWithZeros(byte b, int lowOrderBitsToPreserve)
-
Field Details
-
PREFIX_MASK
private static final int PREFIX_MASK- See Also:
-
SUPPORTED_MESSAGES
-
-
Constructor Details
-
DefaultDnsRecordEncoder
protected DefaultDnsRecordEncoder()Creates a new instance.
-
-
Method Details
-
encodeQuestion
Description copied from interface:DnsRecordEncoderEncodes aDnsQuestion.- Specified by:
encodeQuestionin interfaceDnsRecordEncoder- Parameters:
out- the output buffer where the encoded question will be written to- Throws:
Exception
-
encodeRecord
Description copied from interface:DnsRecordEncoderEncodes aDnsRecord.- Specified by:
encodeRecordin interfaceDnsRecordEncoder- Parameters:
out- the output buffer where the encoded record will be written to- Throws:
Exception
-
encodeRecord0
- Throws:
Exception
-
encodePtrRecord
- Throws:
Exception
-
encodeOptPseudoRecord
- Throws:
Exception
-
encodeOptEcsRecord
- Throws:
Exception
-
calculateEcsAddressLength
static int calculateEcsAddressLength(int sourcePrefixLength, int lowOrderBitsToPreserve) -
encodeRawRecord
- Throws:
Exception
-
encodeName
- Throws:
Exception
-
padWithZeros
private static byte padWithZeros(byte b, int lowOrderBitsToPreserve)
-