TelnetInputStream list()
LIST files on a remote FTP server
void login(java.lang.String user, java.lang.String password)
login user to a host with username user and password password
protected java.net.Socket openDataConnection(java.lang.String cmd)
void openServer(java.lang.String host)
open a FTP connection to host host.
void openServer(java.lang.String host, int port)
open a FTP connection to host host on port port.
TelnetOutputStream put(java.lang.String filename)
PUT a file to the FTP server
protected int readReply()
Methods inherited from class sun.net.TransferProtocolClient
getResponseString, getResponseStrings, readServerResponse, sendServer
Methods inherited from class sun.net.NetworkClient
doConnect, serverIsOpen
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeServer
public void closeServer()
throws java.io.IOException
issue the QUIT command to the FTP server and close the connection.
Overrides:
closeServer in class NetworkClient
openServer
public void openServer(java.lang.String host,
int port)
throws java.io.IOException
open a FTP connection to host host on port port.
Overrides:
openServer in class NetworkClient
login
public void login(java.lang.String user,
java.lang.String password)
throws java.io.IOException
login user to a host with username user and password password
static java.lang.String ftpProxyHost
Deprecated.
static int ftpProxyPort
Deprecated.
static boolean useFtpProxy
Deprecated.
java.lang.String welcomeMsg
Welcome message from the server, if any.
Fields inherited from class sun.net.TransferProtocolClient
lastReplyCode, serverResponse
Fields inherited from class sun.net.NetworkClient
serverInput, serverOutput, serverSocket
Constructor Summary
FtpClient()
Create an uninitialized FTP client.
FtpClient(java.lang.String host)
New FTP client connected to host host.
FtpClient(java.lang.String host, int port)
New FTP client connected to host host, port port.
Method Summary
void ascii()
Set transfer type to 'A'
void binary()
Set transfer type to 'I'
void cd(java.lang.String remoteDirectory)
CD to a specific directory on a remote FTP server
void closeServer()
issue the QUIT command to the FTP server and close the connection.