org.apache.commons.net
public class FingerClient extends SocketClient
FingerClient finger; finger = new FingerClient(); try { finger.connect("foo.bar.com"); System.out.println(finger.query("foobar", false)); finger.disconnect(); } catch(IOException e) { System.err.println("Error I/O exception: " + e.getMessage()); return; }
Field Summary | |
---|---|
static int | DEFAULT_PORT
The default FINGER port. |
Constructor Summary | |
---|---|
FingerClient()
The default FingerClient constructor. |
Method Summary | |
---|---|
InputStream | getInputStream(boolean longOutput, String username)
Fingers a user and returns the input stream from the network connection
of the finger query. |
InputStream | getInputStream(boolean longOutput)
Fingers the connected host and returns the input stream from
the network connection of the finger query. |
String | query(boolean longOutput, String username)
Fingers a user at the connected host and returns the output
as a String. |
String | query(boolean longOutput)
Fingers the connected host and returns the output
as a String. |
DEFAULT_PORT
.
Parameters: longOutput Set to true if long output is requested, false if not. username The name of the user to finger.
Returns: The InputStream of the network connection of the finger query. Can be read to obtain finger results.
Throws: IOException If an I/O error during the operation.
Parameters: longOutput Set to true if long output is requested, false if not.
Returns: The InputStream of the network connection of the finger query. Can be read to obtain finger results.
Throws: IOException If an I/O error during the operation.
Parameters: longOutput Set to true if long output is requested, false if not. username The name of the user to finger.
Returns: The result of the finger query.
Throws: IOException If an I/O error occurs while reading the socket.
query(longOutput, "")
.
Parameters: longOutput Set to true if long output is requested, false if not.
Returns: The result of the finger query.
Throws: IOException If an I/O error occurs while reading the socket.