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 DnsRecordEncoder
recordEncoder
-
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) void
encode(DnsQuery query, ByteBuf out)
private static void
encodeHeader(DnsQuery query, ByteBuf buf)
Encodes the header that is always 12 bytes long.private void
encodeQuestions(DnsQuery query, ByteBuf buf)
private void
encodeRecords(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
-
-