Class DnsAddressDecoder
java.lang.Object
io.netty.resolver.dns.DnsAddressDecoder
final class DnsAddressDecoder
extends java.lang.Object
Decodes an
InetAddress from an A or AAAA DnsRawRecord.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static java.net.InetAddressdecodeAddress(DnsRecord record, java.lang.String name, boolean decodeIdn) Decodes anInetAddressfrom an A or AAAADnsRawRecord.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
INADDRSZ4
private static final int INADDRSZ4- See Also:
-
INADDRSZ6
private static final int INADDRSZ6- See Also:
-
-
Constructor Details
-
DnsAddressDecoder
private DnsAddressDecoder()
-
-
Method Details
-
decodeAddress
static java.net.InetAddress decodeAddress(DnsRecord record, java.lang.String name, boolean decodeIdn) Decodes anInetAddressfrom an A or AAAADnsRawRecord.- Parameters:
record- theDnsRecord, most likely aDnsRawRecordname- the host name of the decoded addressdecodeIdn- whether to convertnameto a unicode host name- Returns:
- the
InetAddress, ornullifrecordis not aDnsRawRecordor its content is malformed
-