public class ClientFTP
extends org.apache.commons.net.ftp.FTPClient
implements org.apache.commons.net.ProtocolCommandListener
getControlConversation()
.Modifier and Type | Field and Description |
---|---|
protected StringBuilder |
controlConversation |
protected Socket |
dataSocket |
ACTIVE_LOCAL_DATA_CONNECTION_MODE, ACTIVE_REMOTE_DATA_CONNECTION_MODE, PASSIVE_LOCAL_DATA_CONNECTION_MODE, PASSIVE_REMOTE_DATA_CONNECTION_MODE
_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
Constructor and Description |
---|
ClientFTP()
Constructs a new
ClientFTP . |
Modifier and Type | Method and Description |
---|---|
protected void |
_connectAction_() |
void |
closeDataConnection() |
void |
disconnect() |
String |
getControlConversation() |
String[] |
getReplyStrings() |
Socket |
openDataConnection(int command,
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(String linePrefix,
String message) |
_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
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
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
protected StringBuilder controlConversation
protected Socket dataSocket
public Socket openDataConnection(int command, String path) throws IOException
command
- the data command (eg, RETR or LIST)path
- the path of the file to retrieveIOException
- if a network error occurspublic void closeDataConnection()
protected void _connectAction_() throws IOException
_connectAction_
in class org.apache.commons.net.ftp.FTPClient
IOException
public void disconnect() throws IOException
disconnect
in class org.apache.commons.net.ftp.FTPClient
IOException
public String getControlConversation()
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 String[] getReplyStrings()
getReplyStrings
in class org.apache.commons.net.ftp.FTP
Copyright © 2003-2014 Internet Archive. All Rights Reserved.