Package io.netty.handler.codec.dns
Class DnsQueryEncoder
- java.lang.Object
-
- io.netty.handler.codec.dns.DnsQueryEncoder
-
final class DnsQueryEncoder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private DnsRecordEncoderrecordEncoder
-
Constructor Summary
Constructors Constructor Description DnsQueryEncoder(DnsRecordEncoder recordEncoder)Creates a new encoder with the specifiedrecordEncoder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidencode(DnsQuery query, ByteBuf out)private static voidencodeHeader(DnsQuery query, ByteBuf buf)Encodes the header that is always 12 bytes long.private voidencodeQuestions(DnsQuery query, ByteBuf buf)private voidencodeRecords(DnsQuery query, DnsSection section, ByteBuf buf)
-
-
-
Field Detail
-
recordEncoder
private final DnsRecordEncoder recordEncoder
-
-
Constructor Detail
-
DnsQueryEncoder
DnsQueryEncoder(DnsRecordEncoder recordEncoder)
Creates a new encoder with the specifiedrecordEncoder.
-
-
Method Detail
-
encode
void encode(DnsQuery query, ByteBuf out) throws java.lang.Exception
- Throws:
java.lang.Exception
-
encodeHeader
private static void encodeHeader(DnsQuery query, ByteBuf buf)
Encodes the header that is always 12 bytes long.- Parameters:
query- the query header being encodedbuf- the buffer the encoded data should be written to
-
encodeQuestions
private void encodeQuestions(DnsQuery query, ByteBuf buf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
encodeRecords
private void encodeRecords(DnsQuery query, DnsSection section, ByteBuf buf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-