APIdia Launch Partner
Top Description Fields Constructors Methods
sun.net

public Class TransferProtocolClient

extends NetworkClient
Class Inheritance
Known Direct Subclasses
sun.net.smtp.SmtpClient
Imports
java.io.*, java.util.Vector

This class implements that basic intefaces of transfer protocols. It is used by subclasses implementing specific protocols.
Author
Jonathan Payne
See Also
sun.net.ftp.FtpClient, sun.net.nntp.NntpClient

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean
protected int
lastReplyCode

code for last reply

protected Vector<String>
serverResponse

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

Inherited from sun.net.NetworkClient:
connectTimeoutDEFAULT_CONNECT_TIMEOUTDEFAULT_READ_TIMEOUTdefaultConnectTimeoutdefaultSoTimeoutencodingproxyreadTimeoutserverInputserverOutputserverSocket

Constructor Summary

AccessConstructor and Description
public
TransferProtocolClient(String host, int port)

standard constructor to host host, port port.

public
TransferProtocolClient()

creates an uninitialized instance of this class.

Method Summary

Modifier and TypeMethod and Description
public String
getResponseString()

converts the server response into a string.

public Vector<String>
getResponseStrings()

Returns all server response strings.

public int
readServerResponse()

Pulls the response from the server and returns the code as a number.

public void
sendServer(String cmd)

Sends command cmd to the server.

Inherited from sun.net.NetworkClient:
closeServercreateSocketdoConnectgetConnectTimeoutgetLocalAddressgetReadTimeoutopenServerserverIsOpensetConnectTimeoutsetReadTimeout

Field Detail

debugback to summary
pack-priv static final boolean debug
lastReplyCodeback to summary
protected int lastReplyCode

code for last reply

serverResponseback to summary
protected Vector<String> serverResponse

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

Constructor Detail

TransferProtocolClientback to summary
public TransferProtocolClient(String host, int port) throws IOException

standard constructor to host host, port port.

TransferProtocolClientback to summary
public TransferProtocolClient()

creates an uninitialized instance of this class.

Method Detail

getResponseStringback to summary
public String getResponseString()

converts the server response into a string.

getResponseStringsback to summary
public Vector<String> getResponseStrings()

Returns all server response strings.

readServerResponseback to summary
public int readServerResponse() throws IOException

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

sendServerback to summary
public void sendServer(String cmd)

Sends command cmd to the server.