org.apache.commons.net.whois
public final class WhoisClient extends FingerClient
WhoisClient whois; whois = new WhoisClient(); try { whois.connect(WhoisClient.DEFAULT_HOST); System.out.println(whois.query("foobar")); whois.disconnect(); } catch(IOException e) { System.err.println("Error I/O exception: " + e.getMessage()); return; }
Field Summary | |
---|---|
static String | DEFAULT_HOST
The default whois host to query. |
static int | DEFAULT_PORT
The default whois port. |
Constructor Summary | |
---|---|
WhoisClient()
The default whois constructor. |
Method Summary | |
---|---|
InputStream | getInputStream(String handle)
Queries the connected whois server for information regarding
the given handle and returns the InputStream of the network connection.
|
String | query(String handle)
Queries the connected whois server for information regarding
the given handle. |
DEFAULT_PORT
.
Parameters: handle The handle to lookup.
Returns: The InputStream of the network connection of the whois query. Can be read to obtain whois results.
Throws: IOException If an I/O error occurs during the operation.
Parameters: handle The handle to lookup.
Returns: The result of the whois query.
Throws: IOException If an I/O error occurs during the operation.