|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.net.SocketClient org.apache.commons.net.ftp.FTP org.apache.commons.net.ftp.FTPClient org.apache.commons.net.ftp.FTPHTTPClient
public class FTPHTTPClient
Experimental attempt at FTP client that tunnels over an HTTP proxy connection.
Field Summary |
---|
Fields inherited from class org.apache.commons.net.ftp.FTPClient |
---|
ACTIVE_LOCAL_DATA_CONNECTION_MODE, ACTIVE_REMOTE_DATA_CONNECTION_MODE, FTP_SYSTEM_TYPE, FTP_SYSTEM_TYPE_DEFAULT, PASSIVE_LOCAL_DATA_CONNECTION_MODE, PASSIVE_REMOTE_DATA_CONNECTION_MODE, SYSTEM_TYPE_PROPERTIES |
Fields inherited from class org.apache.commons.net.SocketClient |
---|
_defaultPort_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL |
Constructor Summary | |
---|---|
FTPHTTPClient(String proxyHost,
int proxyPort)
|
|
FTPHTTPClient(String proxyHost,
int proxyPort,
String proxyUser,
String proxyPass)
|
Method Summary | |
---|---|
protected Socket |
_openDataConnection_(int command,
String arg)
Establishes a data connection with the FTP server, returning a Socket for the connection if successful. |
protected Socket |
_openDataConnection_(String command,
String arg)
Establishes a data connection with the FTP server, returning a Socket for the connection if successful. |
void |
connect(String host,
int port)
Opens a Socket connected to a remote host at the specified port and originating from the current host at a system assigned port. |
Methods inherited from class org.apache.commons.net.ftp.FTP |
---|
__getReplyNoReport, __noop, abor, acct, allo, allo, appe, cdup, cwd, dele, eprt, epsv, feat, getCommandSupport, getControlEncoding, getReply, getReplyCode, getReplyString, getReplyStrings, help, help, isStrictMultilineParsing, list, list, mdtm, mfmt, mkd, mlsd, mlsd, mlst, mlst, mode, nlst, nlst, noop, pass, pasv, port, pwd, quit, rein, rest, retr, rmd, rnfr, rnto, sendCommand, sendCommand, sendCommand, sendCommand, setControlEncoding, setStrictMultilineParsing, site, smnt, stat, stat, stor, stou, stou, stru, syst, type, type, user |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FTPHTTPClient(String proxyHost, int proxyPort, String proxyUser, String proxyPass)
public FTPHTTPClient(String proxyHost, int proxyPort)
Method Detail |
---|
protected Socket _openDataConnection_(int command, String arg) throws IOException
FTPClient.setRestartOffset(long)
,
a REST command is issued to the server with the offset as
an argument before establishing the data connection. Active
mode connections also cause a local PORT command to be issued.
_openDataConnection_
in class FTPClient
command
- The int representation of the FTP command to send.arg
- The arguments to the FTP command. If this parameter is
set to null, then the command is sent with no argument.
IllegalStateException
- if connection mode is not passive
IOException
- If an I/O error occurs while either sending a
command to the server or receiving a reply from the server.protected Socket _openDataConnection_(String command, String arg) throws IOException
FTPClient.setRestartOffset(long)
,
a REST command is issued to the server with the offset as
an argument before establishing the data connection. Active
mode connections also cause a local PORT command to be issued.
_openDataConnection_
in class FTPClient
command
- The text representation of the FTP command to send.arg
- The arguments to the FTP command. If this parameter is
set to null, then the command is sent with no argument.
IllegalStateException
- if connection mode is not passive
IOException
- If an I/O error occurs while either sending a
command to the server or receiving a reply from the server.public void connect(String host, int port) throws SocketException, IOException
SocketClient
_connectAction_()
is called to perform connection initialization actions.
connect
in class SocketClient
host
- The name of the remote host.port
- The port to connect to on the remote host.
SocketException
- If the socket timeout could not be set.
IOException
- If the socket could not be opened. In most
cases you will only want to catch IOException since SocketException is
derived from it.
UnknownHostException
- If the hostname cannot be resolved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |