@UnstableApi public class DefaultDnsRecordEncoder extends java.lang.Object implements DnsRecordEncoder
DnsRecordEncoder implementation.DefaultDnsRecordDecoder| Modifier and Type | Field and Description |
|---|---|
private static int |
PREFIX_MASK |
DEFAULT| Modifier | Constructor and Description |
|---|---|
protected |
DefaultDnsRecordEncoder()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static int |
calculateEcsAddressLength(int sourcePrefixLength,
int lowOrderBitsToPreserve) |
protected void |
encodeName(java.lang.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) |
void |
encodeQuestion(DnsQuestion question,
ByteBuf out)
Encodes a
DnsQuestion. |
private void |
encodeRawRecord(DnsRawRecord record,
ByteBuf out) |
void |
encodeRecord(DnsRecord record,
ByteBuf out)
Encodes a
DnsRecord. |
private void |
encodeRecord0(DnsRecord record,
ByteBuf out) |
(package private) static byte |
padWithZeros(byte b,
int lowOrderBitsToPreserve) |
private static final int PREFIX_MASK
protected DefaultDnsRecordEncoder()
public final void encodeQuestion(DnsQuestion question, ByteBuf out) throws java.lang.Exception
DnsRecordEncoderDnsQuestion.encodeQuestion in interface DnsRecordEncoderout - the output buffer where the encoded question will be written tojava.lang.Exceptionpublic void encodeRecord(DnsRecord record, ByteBuf out) throws java.lang.Exception
DnsRecordEncoderDnsRecord.encodeRecord in interface DnsRecordEncoderout - the output buffer where the encoded record will be written tojava.lang.Exceptionprivate void encodeRecord0(DnsRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exceptionprivate void encodePtrRecord(DnsPtrRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exceptionprivate void encodeOptPseudoRecord(DnsOptPseudoRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exceptionprivate void encodeOptEcsRecord(DnsOptEcsRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exceptionstatic int calculateEcsAddressLength(int sourcePrefixLength,
int lowOrderBitsToPreserve)
private void encodeRawRecord(DnsRawRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exceptionprotected void encodeName(java.lang.String name,
ByteBuf buf)
throws java.lang.Exception
java.lang.Exceptionstatic byte padWithZeros(byte b,
int lowOrderBitsToPreserve)