public class FingerConnection extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT
The default finger port.
|
protected Socket |
socket
The underlying socket used for communications.
|
protected boolean |
verbose
If we want a verbose response.
|
| Constructor and Description |
|---|
FingerConnection(String host)
Creates a new finger connection.
|
FingerConnection(String host,
int port)
Creates a new finger connection.
|
| Modifier and Type | Method and Description |
|---|---|
String |
finger(String username)
Fingers the specified user.
|
String |
finger(String username,
String hostname)
Fingers the specified user at the specified host.
|
boolean |
isVerbose()
Retrieves the verbose flag.
|
String |
list()
Lists the available users.
|
void |
setVerbose(boolean verbose)
Sets the verbose flag.
|
public static final int DEFAULT_PORT
protected Socket socket
protected boolean verbose
public FingerConnection(String host) throws IOException
host - the name of the internet host to connect toIOExceptionpublic FingerConnection(String host, int port) throws IOException
host - the name of the internet host to connect toport - the port to connect toIOExceptionpublic boolean isVerbose()
public void setVerbose(boolean verbose)
verbose - true for more verbose, false otherwisepublic String list() throws IOException
IOExceptionpublic String finger(String username) throws IOException
username - the user to fingerIOExceptionpublic String finger(String username, String hostname) throws IOException
username - the user to finger (null for any user)hostname - the domain of the user (null for any domain)IOExceptionCopyright © 2017. All rights reserved.