    All Packages    This Package    Previous    Next

# Class net.ftp.FtpClient

    java.lang.Object
       |
       +----net.NetworkClient
               |
               +----net.TransferProtocolClient
                       |
                       +----net.ftp.FtpClient

public class FtpClient
extends TransferProtocolClient

This class implements the FTP client.

Version:
  1.24, 14 Mar 1995
Author:
  Jonathan Payne

##

ftpProxyHost
ftpProxyPort
useFtpProxy

##

FtpClient(String)
  New FTP client connected to host host.
FtpClient(String, int)
  New FTP client connected to host host, port port.
FtpClient()
  Create an uninitialized FTP client.

##

ascii()
  Set transfer type to 'A'
binary()
  Set transfer type to 'I'
cd(String)
  CD to a specific directory on a remote FTP server
closeServer()
  issue the QUIT command to the FTP server and close the connection.
get(String)
  GET a file from the FTP server
issueCommand(String)
issueCommandCheck(String)
list()
  LIST files on a remote FTP server
login(String, String)
  login user to a host with username user and password password
openDataConnection(String)
openServer(String)
  open a FTP connection to host host.
openServer(String, int)
  open a FTP connection to host host on port port.
put(String)
  PUT a file to the FTP server
readReply()

##

useFtpProxy

      public static boolean useFtpProxy

ftpProxyHost

      public static String ftpProxyHost

ftpProxyPort

      public static int ftpProxyPort

##

FtpClient

      public FtpClient(String host)

  New FTP client connected to host host.

FtpClient

      public FtpClient(String host,
                       int port)

  New FTP client connected to host host, port port.

FtpClient

      public FtpClient()

  Create an uninitialized FTP client.

##

closeServer

      public void closeServer()

  issue the QUIT command to the FTP server and close the connection.
  Overrides:
    closeServer in class NetworkClient

issueCommand

      protected int issueCommand(String cmd)

issueCommandCheck

      protected void issueCommandCheck(String cmd)

readReply

      protected int readReply()

openDataConnection

      protected Socket openDataConnection(String cmd)

openServer

      public void openServer(String host)

  open a FTP connection to host host.

openServer

      public void openServer(String host,
                             int port)

  open a FTP connection to host host on port port.
  Overrides:
    openServer in class NetworkClient

login

      public void login(String user,
                        String password)

  login user to a host with username user and password password

get

      public TelnetInputStream get(String filename)

  GET a file from the FTP server

put

      public TelnetOutputStream put(String filename)

  PUT a file to the FTP server

list

      public TelnetInputStream list()

  LIST files on a remote FTP server

cd

      public void cd(String remoteDirectory)

  CD to a specific directory on a remote FTP server

binary

      public void binary()

  Set transfer type to 'I'

ascii

      public void ascii()

  Set transfer type to 'A'

    All Packages    This Package    Previous    Next