|
||||||||||
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.archive.net.ClientFTP
public class ClientFTP
Client for FTP operations. Saves the commands sent to the server and replies
received, which can be retrieved with getControlConversation()
.
Field Summary | |
---|---|
protected java.lang.StringBuilder |
controlConversation
|
protected java.net.Socket |
dataSocket
|
Fields inherited from class org.apache.commons.net.ftp.FTPClient |
---|
ACTIVE_LOCAL_DATA_CONNECTION_MODE, ACTIVE_REMOTE_DATA_CONNECTION_MODE, PASSIVE_LOCAL_DATA_CONNECTION_MODE, PASSIVE_REMOTE_DATA_CONNECTION_MODE |
Fields inherited from class org.apache.commons.net.ftp.FTP |
---|
_commandSupport_, _controlEncoding, _controlInput_, _controlOutput_, _newReplyString, _replyCode, _replyLines, _replyString, ASCII_FILE_TYPE, BINARY_FILE_TYPE, BLOCK_TRANSFER_MODE, CARRIAGE_CONTROL_TEXT_FORMAT, COMPRESSED_TRANSFER_MODE, DEFAULT_CONTROL_ENCODING, DEFAULT_DATA_PORT, DEFAULT_PORT, EBCDIC_FILE_TYPE, FILE_STRUCTURE, LOCAL_FILE_TYPE, NON_PRINT_TEXT_FORMAT, PAGE_STRUCTURE, RECORD_STRUCTURE, STREAM_TRANSFER_MODE, strictMultilineParsing, TELNET_TEXT_FORMAT |
Fields inherited from class org.apache.commons.net.SocketClient |
---|
_defaultPort_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL |
Constructor Summary | |
---|---|
ClientFTP()
Constructs a new ClientFTP . |
Method Summary | |
---|---|
protected void |
_connectAction_()
|
void |
closeDataConnection()
|
void |
disconnect()
|
java.lang.String |
getControlConversation()
|
java.lang.String[] |
getReplyStrings()
|
java.net.Socket |
openDataConnection(int command,
java.lang.String path)
Opens a data connection. |
void |
protocolCommandSent(org.apache.commons.net.ProtocolCommandEvent event)
|
void |
protocolReplyReceived(org.apache.commons.net.ProtocolCommandEvent event)
|
protected void |
recordControlMessage(java.lang.String linePrefix,
java.lang.String message)
|
Methods inherited from class org.apache.commons.net.ftp.FTPClient |
---|
_openDataConnection_, abort, allocate, allocate, appendFile, appendFileStream, changeToParentDirectory, changeWorkingDirectory, completePendingCommand, configure, deleteFile, enterLocalActiveMode, enterLocalPassiveMode, enterRemoteActiveMode, enterRemotePassiveMode, getBufferSize, getDataConnectionMode, getListArguments, getListHiddenFiles, getModificationTime, getPassiveHost, getPassivePort, getRestartOffset, getStatus, getStatus, getSystemName, initiateListParsing, initiateListParsing, initiateListParsing, isRemoteVerificationEnabled, listFiles, listFiles, listHelp, listHelp, listNames, listNames, login, login, logout, makeDirectory, printWorkingDirectory, remoteAppend, remoteRetrieve, remoteStore, remoteStoreUnique, remoteStoreUnique, removeDirectory, rename, retrieveFile, retrieveFileStream, sendNoOp, sendSiteCommand, setBufferSize, setDataTimeout, setFileStructure, setFileTransferMode, setFileType, setFileType, setListHiddenFiles, setParserFactory, setRemoteVerificationEnabled, setRestartOffset, storeFile, storeFileStream, storeUniqueFile, storeUniqueFile, storeUniqueFileStream, storeUniqueFileStream, structureMount |
Methods inherited from class org.apache.commons.net.ftp.FTP |
---|
abor, acct, addProtocolCommandListener, allo, allo, appe, cdup, cwd, dele, getControlEncoding, getReply, getReplyCode, getReplyString, help, help, isStrictMultilineParsing, list, list, mdtm, mkd, mode, nlst, nlst, noop, pass, pasv, port, pwd, quit, rein, removeProtocolCommandListener, 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 org.apache.commons.net.SocketClient |
---|
connect, connect, connect, connect, connect, connect, getConnectTimeout, getDefaultPort, getDefaultTimeout, getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort, getSoLinger, getSoTimeout, getTcpNoDelay, isConnected, setConnectTimeout, setDefaultPort, setDefaultTimeout, setReceiveBufferSize, setSendBufferSize, setServerSocketFactory, setSocketFactory, setSoLinger, setSoTimeout, setTcpNoDelay, verifyRemote |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.StringBuilder controlConversation
protected java.net.Socket dataSocket
Constructor Detail |
---|
public ClientFTP()
ClientFTP
.
Method Detail |
---|
public java.net.Socket openDataConnection(int command, java.lang.String path) throws java.io.IOException
command
- the data command (eg, RETR or LIST)path
- the path of the file to retrieve
java.io.IOException
- if a network error occurspublic void closeDataConnection()
protected void _connectAction_() throws java.io.IOException
_connectAction_
in class org.apache.commons.net.ftp.FTPClient
java.io.IOException
public void disconnect() throws java.io.IOException
disconnect
in class org.apache.commons.net.ftp.FTPClient
java.io.IOException
public java.lang.String getControlConversation()
protected void recordControlMessage(java.lang.String linePrefix, java.lang.String message)
public void protocolCommandSent(org.apache.commons.net.ProtocolCommandEvent event)
protocolCommandSent
in interface org.apache.commons.net.ProtocolCommandListener
public void protocolReplyReceived(org.apache.commons.net.ProtocolCommandEvent event)
protocolReplyReceived
in interface org.apache.commons.net.ProtocolCommandListener
public java.lang.String[] getReplyStrings()
getReplyStrings
in class org.apache.commons.net.ftp.FTP
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |