@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
DnsRecordEncoder
DnsQuestion
.encodeQuestion
in interface DnsRecordEncoder
out
- the output buffer where the encoded question will be written tojava.lang.Exception
public void encodeRecord(DnsRecord record, ByteBuf out) throws java.lang.Exception
DnsRecordEncoder
DnsRecord
.encodeRecord
in interface DnsRecordEncoder
out
- the output buffer where the encoded record will be written tojava.lang.Exception
private void encodeRecord0(DnsRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exception
private void encodePtrRecord(DnsPtrRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exception
private void encodeOptPseudoRecord(DnsOptPseudoRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exception
private void encodeOptEcsRecord(DnsOptEcsRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exception
static int calculateEcsAddressLength(int sourcePrefixLength, int lowOrderBitsToPreserve)
private void encodeRawRecord(DnsRawRecord record, ByteBuf out) throws java.lang.Exception
java.lang.Exception
protected void encodeName(java.lang.String name, ByteBuf buf) throws java.lang.Exception
java.lang.Exception
static byte padWithZeros(byte b, int lowOrderBitsToPreserve)