public class DNSJavaNameService extends Object implements sun.net.spi.nameservice.NameService
This Name Service Provider uses dnsjava.
To use this provider, you must set the following system property: sun.net.spi.nameservice.provider.1=dns,dnsjava
Modifier | Constructor and Description |
---|---|
protected |
DNSJavaNameService()
Creates a DNSJavaNameService instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getHostByAddr(byte[] addr)
Performs a reverse DNS lookup.
|
InetAddress[] |
lookupAllHostAddr(String host)
Performs a forward DNS lookup for the host name.
|
protected DNSJavaNameService()
Uses the sun.net.spi.nameservice.nameservers, sun.net.spi.nameservice.domain, and java.net.preferIPv6Addresses properties for configuration.
public InetAddress[] lookupAllHostAddr(String host) throws UnknownHostException
lookupAllHostAddr
in interface sun.net.spi.nameservice.NameService
host
- The host name to resolve.UnknownHostException
public String getHostByAddr(byte[] addr) throws UnknownHostException
getHostByAddr
in interface sun.net.spi.nameservice.NameService
addr
- The ip address to lookup.UnknownHostException
Copyright © 2020 dnsjava.org. All rights reserved.