Package org.minidns.dnsserverlookup
Class AndroidUsingExec
- java.lang.Object
-
- org.minidns.dnsserverlookup.AbstractDnsServerLookupMechanism
-
- org.minidns.dnsserverlookup.AndroidUsingExec
-
- All Implemented Interfaces:
Comparable<DnsServerLookupMechanism>,DnsServerLookupMechanism
public final class AndroidUsingExec extends AbstractDnsServerLookupMechanism
Try to retrieve the list of DNS server by executing getprop.
-
-
Field Summary
Fields Modifier and Type Field Description static DnsServerLookupMechanismINSTANCEstatic intPRIORITY-
Fields inherited from class org.minidns.dnsserverlookup.AbstractDnsServerLookupMechanism
LOGGER
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getDnsServerAddresses()Returns a List of String representing ideally IP addresses.booleanisAvailable()protected static Set<String>parseProps(BufferedReader lnr, boolean logWarning)-
Methods inherited from class org.minidns.dnsserverlookup.AbstractDnsServerLookupMechanism
compareTo, getName, getPriority, toListOfStrings
-
-
-
-
Field Detail
-
INSTANCE
public static final DnsServerLookupMechanism INSTANCE
-
PRIORITY
public static final int PRIORITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDnsServerAddresses
public List<String> getDnsServerAddresses()
Description copied from interface:DnsServerLookupMechanismReturns a List of String representing ideally IP addresses. The list must be modifiable.Note that the lookup mechanisms are not required to assure that only IP addresses are returned. This verification is performed in when using
DnsClient.findDNS().- Specified by:
getDnsServerAddressesin interfaceDnsServerLookupMechanism- Specified by:
getDnsServerAddressesin classAbstractDnsServerLookupMechanism- Returns:
- a List of Strings presenting hopefully IP addresses.
-
isAvailable
public boolean isAvailable()
-
parseProps
protected static Set<String> parseProps(BufferedReader lnr, boolean logWarning) throws UnknownHostException, IOException
- Throws:
UnknownHostExceptionIOException
-
-