Package netscape.net

Class 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 Detail

      • serverResponse

        protected java.util.Vector<java.lang.String> serverResponse
        Array of strings (usually 1 entry) for the last reply from the server.
      • lastReplyCode

        protected int lastReplyCode
        code for last reply
    • 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.