gnu.inet.finger

Class FingerConnection


public class FingerConnection
extends java.lang.Object

A client for the finger protocol described in RFC 1288.
Author:
Chris Burdess

Field Summary

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 Summary

FingerConnection(String host)
Creates a new finger connection.
FingerConnection(String host, int port)
Creates a new finger connection.

Method Summary

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.

Field Details

DEFAULT_PORT

public static final int DEFAULT_PORT
The default finger port.
Field Value:
79

socket

protected Socket socket
The underlying socket used for communications.

verbose

protected boolean verbose
If we want a verbose response.

Constructor Details

FingerConnection

public FingerConnection(String host)
            throws IOException
Creates a new finger connection.
Parameters:
host - the name of the internet host to connect to

FingerConnection

public FingerConnection(String host,
                        int port)
            throws IOException
Creates a new finger connection.
Parameters:
host - the name of the internet host to connect to
port - the port to connect to

Method Details

finger

public String finger(String username)
            throws IOException
Fingers the specified user.
Parameters:
username - the user to finger
Returns:
information about all matching users

finger

public String finger(String username,
                     String hostname)
            throws IOException
Fingers the specified user at the specified host.
Parameters:
username - the user to finger (null for any user)
hostname - the domain of the user (null for any domain)
Returns:
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.
Parameters:
verbose - true for more verbose, false otherwise

© Copyright 2003 The Free Software Foundation, all rights reserved