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 int
calculateEcsAddressLength
(int sourcePrefixLength, int lowOrderBitsToPreserve) protected void
encodeName
(String name, ByteBuf buf) private void
encodeOptEcsRecord
(DnsOptEcsRecord record, ByteBuf out) private void
encodeOptPseudoRecord
(DnsOptPseudoRecord record, ByteBuf out) private void
encodePtrRecord
(DnsPtrRecord record, ByteBuf out) final void
encodeQuestion
(DnsQuestion question, ByteBuf out) Encodes aDnsQuestion
.private void
encodeRawRecord
(DnsRawRecord record, ByteBuf out) void
encodeRecord
(DnsRecord record, ByteBuf out) Encodes aDnsRecord
.private void
encodeRecord0
(DnsRecord record, ByteBuf out) private static byte
padWithZeros
(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:DnsRecordEncoder
Encodes aDnsQuestion
.- Specified by:
encodeQuestion
in interfaceDnsRecordEncoder
- Parameters:
out
- the output buffer where the encoded question will be written to- Throws:
Exception
-
encodeRecord
Description copied from interface:DnsRecordEncoder
Encodes aDnsRecord
.- Specified by:
encodeRecord
in 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)
-