public class

TransferProtocolClient

extends NetworkClient
java.lang.Object
   ↳ sun.net.NetworkClient
     ↳ sun.net.TransferProtocolClient
Known Direct Subclasses

Class Overview

This class implements that basic intefaces of transfer protocols. It is used by subclasses implementing specific protocols.

See Also

Summary

Fields
protected int lastReplyCode code for last reply
protected Vector serverResponse Array of strings (usually 1 entry) for the last reply from the server.
[Expand]
Inherited Fields
From class sun.net.NetworkClient
Public Constructors
TransferProtocolClient(String host, int port)
standard constructor to host host, port port.
TransferProtocolClient()
creates an uninitialized instance of this class.
Public Methods
String getResponseString()
converts the server response into a string.
Vector getResponseStrings()
Returns all server response strings.
int readServerResponse()
Pulls the response from the server and returns the code as a number.
void sendServer(String cmd)
Sends command cmd to the server.
[Expand]
Inherited Methods
From class sun.net.NetworkClient
From class java.lang.Object

Fields

protected int lastReplyCode

code for last reply

protected Vector serverResponse

Array of strings (usually 1 entry) for the last reply from the server.

Public Constructors

public TransferProtocolClient (String host, int port)

standard constructor to host host, port port.

Throws
IOException

public TransferProtocolClient ()

creates an uninitialized instance of this class.

Public Methods

public String getResponseString ()

converts the server response into a string.

public Vector getResponseStrings ()

Returns all server response strings.

public int readServerResponse ()

Pulls the response from the server and returns the code as a number. Returns -1 on failure.

Throws
IOException

public void sendServer (String cmd)

Sends command cmd to the server.