gnu.inet.finger
Class FingerConnection
java.lang.Object
gnu.inet.finger.FingerConnection
public class FingerConnection
extends java.lang.Object
A client for the finger protocol described in RFC 1288.
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.
|
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.
|
DEFAULT_PORT
public static final int DEFAULT_PORT
The default finger port.
socket
protected Socket socket
The underlying socket used for communications.
verbose
protected boolean verbose
If we want a verbose response.
FingerConnection
public FingerConnection(String host)
throws IOException
Creates a new finger connection.
host
- the name of the internet host to connect to
FingerConnection
public FingerConnection(String host,
int port)
throws IOException
Creates a new finger connection.
host
- the name of the internet host to connect toport
- the port to connect to
finger
public String finger(String username)
throws IOException
Fingers the specified user.
username
- the user to finger
- information about all matching users
finger
public String finger(String username,
String hostname)
throws IOException
Fingers the specified user at the specified host.
username
- the user to finger (null for any user)hostname
- the domain of the user (null for any domain)
- information about all matching users
isVerbose
public boolean isVerbose()
Retrieves the verbose flag.
If true, the server should provide more output.
list
public String list()
throws IOException
Lists the available users.
setVerbose
public void setVerbose(boolean verbose)
Sets the verbose flag.
If true, the server should provide more output.
verbose
- true for more verbose, false otherwise