AndroidLookup  0.02
 All Classes Namespaces Files Functions Variables Pages
Protected Member Functions | Static Protected Member Functions | List of all members
com.jburto2.androidlookup.LookupAddressTask Class Reference

This class is an LookupTask that looks up all IP addresses for a if given a hostname. More...

Inheritance diagram for com.jburto2.androidlookup.LookupAddressTask:
com.jburto2.androidlookup.LookupTask

Protected Member Functions

String doInBackground (String...urls)
 This function uses java.net.InetAddress to lookup all the ipAddresses for a given host. More...
 
void onPostExecute (String str)
 Method to be done after the task has executed. More...
 
- Protected Member Functions inherited from com.jburto2.androidlookup.LookupTask
String doInBackground (String...urls)
 This function makes the function call in the background. More...
 
void onPostExecute (String str)
 Method to be done after the task has executed. More...
 

Static Protected Member Functions

static boolean isIP (String input) throws UnknownHostException
 Determine whether an address is an IPv4 address. More...
 

Additional Inherited Members

- Public Member Functions inherited from com.jburto2.androidlookup.LookupTask
Exception getException ()
 
String getExceptionMsg ()
 
- Protected Attributes inherited from com.jburto2.androidlookup.LookupTask
Exception exception
 This holds any exception generated from the lookup call. More...
 

Detailed Description

This class is an LookupTask that looks up all IP addresses for a if given a hostname.

Author
James Burton

Definition at line 18 of file LookupAddressTask.java.

Member Function Documentation

protected String com.jburto2.androidlookup.LookupAddressTask.doInBackground ( String...  urls)
protected

This function uses java.net.InetAddress to lookup all the ipAddresses for a given host.

Parameters
urlsArray of strings that are arguments to the function. url[0] is the address to lookup.
Returns
String that represents all the IP addresses for the host with ';' delimiter.
null If the call failed.
Exceptions
Exceptiongenerated from InetAddress call is stored in the public instance variable exception.

Found NSLookup from http://www.coderanch.com/t/328875/java/java/nslookup-Java More on inet addresses from http://download.java.net/jdk7/archive/b123/docs/api/java/net/InetAddress.html

Definition at line 37 of file LookupAddressTask.java.

public static boolean com.jburto2.androidlookup.LookupAddressTask.isIP ( String  input) throws UnknownHostException
staticprotected

Determine whether an address is an IPv4 address.

Parameters
inputAddress to check
Returns
true if an IP address.
false if not an IP address.

Definition at line 87 of file LookupAddressTask.java.

protected void com.jburto2.androidlookup.LookupAddressTask.onPostExecute ( String  str)
protected

Method to be done after the task has executed.

Parameters
strSome string

Definition at line 72 of file LookupAddressTask.java.


The documentation for this class was generated from the following file: