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; }
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HOST
The default whois host to query.
|
static int |
DEFAULT_PORT
The default whois port.
|
_defaultPort_, _hostname_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL
Constructor and Description |
---|
WhoisClient()
The default whois constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getInputStream, getInputStream, getInputStream, query, query
_connectAction_, addProtocolCommandListener, connect, connect, connect, connect, connect, connect, createCommandSupport, disconnect, fireCommandSent, fireReplyReceived, getCharset, getCharsetName, getCommandSupport, getConnectTimeout, getDefaultPort, getDefaultTimeout, getKeepAlive, getLocalAddress, getLocalPort, getProxy, getReceiveBufferSize, getRemoteAddress, getRemotePort, getSendBufferSize, getServerSocketFactory, getSoLinger, getSoTimeout, getTcpNoDelay, isAvailable, isConnected, removeProtocolCommandListener, setCharset, setConnectTimeout, setDefaultPort, setDefaultTimeout, setKeepAlive, setProxy, setReceiveBufferSize, setSendBufferSize, setServerSocketFactory, setSocketFactory, setSoLinger, setSoTimeout, setTcpNoDelay, verifyRemote
public static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public WhoisClient()
DEFAULT_PORT
.public String query(String handle) throws IOException
handle
- The handle to lookup.IOException
- If an I/O error occurs during the operation.public InputStream getInputStream(String handle) throws IOException
handle
- The handle to lookup.IOException
- If an I/O error occurs during the operation.Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.