com.ezprotocols.ezwhois
Class EzWhois

java.lang.Object
  |
  +--com.ezprotocols.ezwhois.EzWhois
All Implemented Interfaces:
java.io.Serializable

public class EzWhois
extends java.lang.Object
implements java.io.Serializable

Queries the Whois Server for domain registration information. With only a few lines of code, you can get complete information on any Internet domain.

Example:


 try{
    EzWhois whois = new EzWhois();
    whois.setWhoisServer("whois.internic.net");
    whois.setWhoisPort(43);
    String info = whois.query("ezprotocols.com");
    System.out.println(info);
 }catch(EzWhoisException ex){
    System.out.println(ex.getMessage());
 }

See Also:
Serialized Form

Constructor Summary
EzWhois()
          Creates a new instance of EzWhois.
 
Method Summary
 java.lang.String getAbout()
          Gets information about EzWhois.
 int getTimeout()
          Gets the Timeout to open the connection with the Whois Server.
 java.lang.String getVersion()
          Gets the version number of EzWhois.
 int getWhoisPort()
          Gets the Whois server port number.
 java.lang.String getWhoisServer()
          Gets the Whois server address.
 java.lang.String query(java.lang.String domain)
          Queries the Whois server and returns information about the Internet domain.
 void setAbout(java.lang.String s)
           
 void setTimeout(int t)
          Sets the Timeout to open the connection with the Whois server.
 void setVersion(java.lang.String s)
           
 void setWhoisPort(int port)
          Sets the Whois server port number (Default is 43).
 void setWhoisServer(java.lang.String s)
          Sets Whois server address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EzWhois

public EzWhois()
Creates a new instance of EzWhois.
Method Detail

query

public java.lang.String query(java.lang.String domain)
                       throws EzWhoisException
Queries the Whois server and returns information about the Internet domain.

setVersion

public void setVersion(java.lang.String s)

setAbout

public void setAbout(java.lang.String s)

setTimeout

public void setTimeout(int t)
Sets the Timeout to open the connection with the Whois server. Default is 0 and implies that the option is disabled (Timeout = infinity).

setWhoisServer

public void setWhoisServer(java.lang.String s)
Sets Whois server address.

setWhoisPort

public void setWhoisPort(int port)
Sets the Whois server port number (Default is 43).

getWhoisServer

public java.lang.String getWhoisServer()
Gets the Whois server address.

getWhoisPort

public int getWhoisPort()
Gets the Whois server port number.

getVersion

public java.lang.String getVersion()
Gets the version number of EzWhois.

getTimeout

public int getTimeout()
Gets the Timeout to open the connection with the Whois Server. Default is 0 and implies that the option is disabled (Timeout = infinity).

getAbout

public java.lang.String getAbout()
Gets information about EzWhois.


Copyright © EzProtocols.com All Rights Reserved.