Top Description Fields Constructors Methods
io.netty.resolver.dns

pack-priv final Class DnsAddressDecoder

extends Object
Class Inheritance
Imports
java.net.IDN, .InetAddress, .UnknownHostException, io.netty.buffer.ByteBuf, .ByteBufHolder, io.netty.handler.codec.dns.DnsRawRecord, .DnsRecord

Decodes an InetAddress from an A or AAAA DnsRawRecord.

Field Summary

Modifier and TypeField and Description
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static InetAddress

Returns:

the InetAddress, or null if record is not a DnsRawRecord or its content is malformed
decodeAddress
(DnsRecord
the DnsRecord, most likely a DnsRawRecord
record
,
String
the host name of the decoded address
name
,
boolean
whether to convert name to a unicode host name
decodeIdn
)

Decodes an InetAddress from an A or AAAA DnsRawRecord.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INADDRSZ4back to summary
private static final int INADDRSZ4
INADDRSZ6back to summary
private static final int INADDRSZ6

Constructor Detail

DnsAddressDecoderback to summary
private DnsAddressDecoder()

Method Detail

decodeAddressback to summary
pack-priv static InetAddress decodeAddress(DnsRecord record, String name, boolean decodeIdn)

Decodes an InetAddress from an A or AAAA DnsRawRecord.

Parameters
record:DnsRecord

the DnsRecord, most likely a DnsRawRecord

name:String

the host name of the decoded address

decodeIdn:boolean

whether to convert name to a unicode host name

Returns:InetAddress

the InetAddress, or null if record is not a DnsRawRecord or its content is malformed