Package netscape.net
Class TransferProtocolClient
- java.lang.Object
-
- netscape.net.NetworkClient
-
- netscape.net.TransferProtocolClient
-
- Direct Known Subclasses:
SmtpClient
public class TransferProtocolClient extends NetworkClient
This class implements that basic intefaces of transfer protocols. It is used by subclasses implementing specific protocols.- Version:
- 1.25, 08/07/97
- Author:
- Jonathan Payne
-
-
Field Summary
Fields Modifier and Type Field Description protected int
lastReplyCode
code for last replyprotected java.util.Vector<java.lang.String>
serverResponse
Array of strings (usually 1 entry) for the last reply from the server.-
Fields inherited from class netscape.net.NetworkClient
serverInput, serverOutput, serverSocket
-
-
Constructor Summary
Constructors Constructor Description TransferProtocolClient()
creates an uninitialized instance of this class.TransferProtocolClient(java.lang.String host, int port)
standard constructor to host host, port port.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getResponseString()
converts the server response into a string.java.util.Vector<java.lang.String>
getResponseStrings()
Returns all server response strings.int
readServerResponse()
Pulls the response from the server and returns the code as a number.void
sendServer(java.lang.String cmd)
Sends command cmd to the server.-
Methods inherited from class netscape.net.NetworkClient
closeServer, doConnect, openServer, serverIsOpen
-
-
-
-
Constructor Detail
-
TransferProtocolClient
public TransferProtocolClient(java.lang.String host, int port) throws java.io.IOException
standard constructor to host host, port port.- Throws:
java.io.IOException
-
TransferProtocolClient
public TransferProtocolClient()
creates an uninitialized instance of this class.
-
-
Method Detail
-
readServerResponse
public int readServerResponse() throws java.io.IOException
Pulls the response from the server and returns the code as a number. Returns -1 on failure.- Throws:
java.io.IOException
-
sendServer
public void sendServer(java.lang.String cmd)
Sends command cmd to the server.
-
getResponseString
public java.lang.String getResponseString()
converts the server response into a string.
-
getResponseStrings
public java.util.Vector<java.lang.String> getResponseStrings()
Returns all server response strings.
-
-