command - The text representation of the FTP command to send. command -要發送的文字表示的FTP命令。
arg - The arguments to the FTP command. arg -命令參數的FTP。 If this parameter is set to null, then the command is sent with no argument.如果這個參數設置為null,則發送該命令沒有參數。
Returns: 返回:
A Socket corresponding to the established data connection.一個Socket對應建立的數據連接。 Null is returned if an FTP protocol error is reported at any point during the establishment and initialization of the connection.如果返回null FTP協議中的任何錯誤,在建立和初始化的連接點的報告。
Throws: 拋出:
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
_connectAction_ _connectAction_
protected void _connectAction_ ()保護無效_connectAction_ ()
throws IOException拋出IOException異常
Description copied from class: FTP 從階級復制的描述: FTP
Initiates control connections and gets initial reply.啟動控制連接,並得到初步答復。 Initializes FTP._controlInput_ and FTP._controlOutput_ .初始化FTP._controlInput_和FTP._controlOutput_ 。
Overrides: 覆蓋:
_connectAction_ in class FTP _connectAction_在課堂上FTP
Throws: 拋出:
setDataTimeout setDataTimeout
public void setDataTimeout (int timeout)公共無效setDataTimeout (智力超時)
Sets the timeout in milliseconds to use when reading from the data connection.設置超時時間以毫秒為單位使用時,從數據連接讀。 This timeout will be set immediately after opening the data connection.此超時將被設置后立即打開數據連接。
Parameters: 參數:
timeout - The default timeout in milliseconds that is used when opening a data connection socket. timeout -默認的超時時間以毫秒為單位,用來當打開一個數據連接插座。
setParserFactory setParserFactory
public void setParserFactory ( FTPFileEntryParserFactory parserFactory)公共無效setParserFactory ( FTPFileEntryParserFactory parserFactory)
set the factory used for parser creation to the supplied factory object.為創建為所提供的解析器工廠對象所使用的工廠。
Parameters: 參數:
parserFactory - factory object used to create FTPFileEntryParsers parserFactory -工廠對象用於創建FTPFileEntryParsers
See Also: 另見:
FTPFileEntryParserFactory , DefaultFTPFileEntryParserFactory FTPFileEntryParserFactory , DefaultFTPFileEntryParserFactory
disconnect斷開
public void disconnect ()公共無效斷開 ()
throws IOException拋出IOException異常
Closes the connection to the FTP server and restores connection parameters to the default values.關閉到FTP服務器,連接參數恢復到默認值的連接。
Overrides: 覆蓋:
disconnect in class FTP disconnect在課堂上FTP
Throws: 拋出:
IOException - If an error occurs while disconnecting. IOException -如果發生錯誤而斷開。
setRemoteVerificationEnabled setRemoteVerificationEnabled
public void setRemoteVerificationEnabled (boolean enable)公共無效setRemoteVerificationEnabled (布爾啟用)
Enable or disable verification that the remote host taking part of a data connection is the same as the host to which the control connection is attached.啟用或禁用核實,利用遠程主機的數據連接部分是作為控制連接到該連接的主機是相同的。 The default is for verification to be enabled.默認值是核實被啟用。 You may set this value at any time, whether the FTPClient is currently connected or not.你可以在任何時候設置此值,是否FTPClient當前連接與否。
Parameters: 參數:
enable - True to enable verification, false to disable verification. enable -真正使核查,虛假禁用驗證。
isRemoteVerificationEnabled isRemoteVerificationEnabled
public boolean isRemoteVerificationEnabled ()公共布爾isRemoteVerificationEnabled ()
Return whether or not verification of the remote host participating in data connections is enabled.返回不論是否在數據連接的遠程主機參加啟用驗證。 The default behavior is for verification to be enabled.默認行為是核實被啟用。
Returns: 返回:
True if verification is enabled, false if not.真如果驗證被啟用,否則為false。
login登錄
public boolean login ( String username,公共布爾登錄 ( 弦樂用戶名,
throws IOException拋出IOException異常
Login to the FTP server using the provided username and password.登錄到FTP服務器使用提供的用戶名和密碼。
Parameters: 參數:
username - The username to login under. username -根據登錄的用戶名。
password - The password to use. password -密碼使用。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
login登錄
public boolean login ( String username,公共布爾登錄 ( 弦樂用戶名,
throws IOException拋出IOException異常
Login to the FTP server using the provided username, password, and account.登錄到FTP服務器使用提供的用戶名,密碼和帳號。 If no account is required by the server, only the username and password, the account information is not used.如果不考慮由服務器,只需要用戶名和密碼,帳戶信息不被使用。
Parameters: 參數:
username - The username to login under. username -根據登錄的用戶名。
password - The password to use. password -密碼使用。
account - The account to use. account -該帳戶使用。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
logout注銷
public boolean logout ()公共布爾注銷 ()
throws IOException拋出IOException異常
Logout of the FTP server by sending the QUIT command.注銷的通過發送QUIT命令FTP服務器。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
changeWorkingDirectory changeWorkingDirectory
public boolean changeWorkingDirectory ( String pathname)公共布爾changeWorkingDirectory ( 字符串路徑名)
throws IOException拋出IOException異常
Change the current working directory of the FTP session.更改的FTP會話的當前工作目錄。
Parameters: 參數:
pathname - The new current working directory. pathname -新的當前工作目錄。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
changeToParentDirectory changeToParentDirectory
public boolean changeToParentDirectory ()公共布爾changeToParentDirectory ()
throws IOException拋出IOException異常
Change to the parent directory of the current working directory.更改為當前工作目錄的父目錄。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
structureMount structureMount
public boolean structureMount ( String pathname)公共布爾structureMount ( 字符串路徑名)
throws IOException拋出IOException異常
Issue the FTP SMNT command.問題的FTP SMNT命令。
Parameters: 參數:
pathname - The pathname to mount. pathname -路徑名上升。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
enterLocalActiveMode enterLocalActiveMode
public void enterLocalActiveMode ()公共無效enterLocalActiveMode ()
Set the current data connection mode to ACTIVE_LOCAL_DATA_CONNECTION_MODE .設置當前數據連接模式ACTIVE_LOCAL_DATA_CONNECTION_MODE 。 No communication with the FTP server is conducted, but this causes all future data transfers to require the FTP server to connect to the client's data port.沒有與FTP服務器進行通信,但是這會導致所有將來的數據傳輸要求的FTP服務器連接到客戶端的數據端口。 Additionally, to accommodate differences between socket implementations on different platforms, this method causes the client to issue a PORT command before every data transfer.此外,為了適應插座之間的差異在不同平台上實現,這種方法使客戶端發出一個擺在每一個數據傳輸端口的命令。
enterLocalPassiveMode enterLocalPassiveMode
public void enterLocalPassiveMode ()公共無效enterLocalPassiveMode ()
Set the current data connection mode to PASSIVE_LOCAL_DATA_CONNECTION_MODE .設置當前數據連接模式PASSIVE_LOCAL_DATA_CONNECTION_MODE 。 Use this method only for data transfers between the client and server.僅用於客戶端和服務器之間的數據傳輸,此方法。 This method causes a PASV (or EPSV) command to be issued to the server before the opening of every data connection, telling the server to open a data port to which the client will connect to conduct data transfers.這種方法將導致使用PASV(或EPSV)命令發出到服務器之前,每一個數據連接孔,告訴服務器來打開一個數據端口,客戶端將連接進行數據傳輸。 The FTPClient will stay in PASSIVE_LOCAL_DATA_CONNECTION_MODE until the mode is changed by calling some other method such as enterLocalActiveMode()該FTPClient將留在PASSIVE_LOCAL_DATA_CONNECTION_MODE直到模式是由其他的方法,例如改變調用一些enterLocalActiveMode()
NB currently calling any connect method will reset the mode to ACTIVE_LOCAL_DATA_CONNECTION_MODE. 注:目前可以調用任何方法將復位模式ACTIVE_LOCAL_DATA_CONNECTION_MODE。
enterRemoteActiveMode enterRemoteActiveMode
public boolean enterRemoteActiveMode ( InetAddress host,公共布爾enterRemoteActiveMode ( InetAddress的主機,
int port)詮釋端口)
throws IOException拋出IOException異常
Set the current data connection mode to ACTIVE_REMOTE_DATA_CONNECTION .設置當前數據連接模式ACTIVE_REMOTE_DATA_CONNECTION 。 Use this method only for server to server data transfers.僅用於服務器到服務器的數據傳輸此方法。 This method issues a PORT command to the server, indicating the other server and port to which it should connect for data transfers.這種方法發出PORT命令到服務器,顯示服務器和端口等它應該連接進行數據傳輸。 You must call this method before EVERY server to server transfer attempt.您必須調用這個擺在每一個服務器到服務器傳輸嘗試的方法。 The FTPClient will NOT automatically continue to issue PORT commands.該FTPClient不會自動繼續發出PORT命令。 You also must remember to call enterLocalActiveMode() if you wish to return to the normal data connection mode.你還必須記住調用enterLocalActiveMode()如果你想返回到正常的數據連接模式。
Parameters: 參數:
host - The passive mode server accepting connections for data transfers. host -被動模式的服務器接受連接,進行數據傳輸。
port - The passive mode server's data port. port -被動模式的服務器的數據端口。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
enterRemotePassiveMode enterRemotePassiveMode
public boolean enterRemotePassiveMode ()公共布爾enterRemotePassiveMode ()
throws IOException拋出IOException異常
Set the current data connection mode to PASSIVE_REMOTE_DATA_CONNECTION_MODE .設置當前數據連接模式PASSIVE_REMOTE_DATA_CONNECTION_MODE 。 Use this method only for server to server data transfers.僅用於服務器到服務器的數據傳輸此方法。 This method issues a PASV command to the server, telling it to open a data port to which the active server will connect to conduct data transfers.這種方法發出PASV命令到服務器,告訴它打開一個數據端口的活動服務器將連接進行數據傳輸。 You must call this method before EVERY server to server transfer attempt.您必須調用這個擺在每一個服務器到服務器傳輸嘗試的方法。 The FTPClient will NOT automatically continue to issue PASV commands.該FTPClient不會自動繼續發行PASV命令。 You also must remember to call enterLocalActiveMode() if you wish to return to the normal data connection mode.你還必須記住調用enterLocalActiveMode()如果你想返回到正常的數據連接模式。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
getPassiveHost getPassiveHost
public String getPassiveHost ()公共字符串 getPassiveHost ()
Returns the hostname or IP address (in the form of a string) returned by the server when entering passive mode.返回的主機名或IP地址(在一個字符串的形式)時,由服務器返回進入被動模式。 If not in passive mode, returns null.如果不是在被動模式,則返回null。 This method only returns a valid value AFTER a data connection has been opened after a call to enterLocalPassiveMode() .這種方法只返回一個有效的值后的數據連接已經打開后調用enterLocalPassiveMode() This is because FTPClient sends a PASV command to the server only just before opening a data connection, and not when you call enterLocalPassiveMode() .這是因為FTPClient發送之前打開數據連接PASV命令到服務器只,而不是當你調用enterLocalPassiveMode()
Returns: 返回:
The passive host name if in passive mode, otherwise null.如果在被動的被動模式,否則無效的主機名。
getPassivePort getPassivePort
public int getPassivePort ()公共詮釋getPassivePort ()
If in passive mode, returns the data port of the passive host.如果在被動模式下,返回被動主機的數據端口。 This method only returns a valid value AFTER a data connection has been opened after a call to enterLocalPassiveMode() .這種方法只返回一個有效的值后的數據連接已經打開后調用enterLocalPassiveMode() This is because FTPClient sends a PASV command to the server only just before opening a data connection, and not when you call enterLocalPassiveMode() .這是因為FTPClient發送之前打開數據連接PASV命令到服務器只,而不是當你調用enterLocalPassiveMode()
Returns: 返回:
The data port of the passive server.被動式服務器數據端口。 If not in passive mode, undefined.如果不是在被動模式下,不確定的。
getDataConnectionMode getDataConnectionMode
public int getDataConnectionMode ()公共詮釋getDataConnectionMode ()
Returns the current data connection mode (one of the _DATA_CONNECTION_MODE constants.返回當前的數據連接模式(一_DATA_CONNECTION_MODE常數。
Returns: 返回:
The current data connection mode (one of the _DATA_CONNECTION_MODE constants.目前的數據連接模式(一_DATA_CONNECTION_MODE常數。
setActivePortRange setActivePortRange
public void setActivePortRange (int minPort,公共無效setActivePortRange (智力minPort,
int maxPort)詮釋maxPort)
Set the client side port range in active mode.客戶端設置在主動模式端口范圍。
Parameters: 參數:
minPort - The lowest available port (inclusive). minPort -最低可用的端口(含)。
maxPort - The highest available port (inclusive). maxPort -最高可用的端口(含)。
Since: 因為:
2.2 2.2
setActiveExternalIPAddress setActiveExternalIPAddress
public void setActiveExternalIPAddress ( String ipAddress)公共無效setActiveExternalIPAddress ( 弦樂的IPAddress)
throws UnknownHostException拋出UnknownHostException
Set the external IP address in active mode.設置在主動模式下的外部IP地址。 Useful when there are multiple network cards.有用當有多個網卡。
Parameters: 參數:
ipAddress - The external IP address of this machine. ipAddress -機器的外部IP地址這一點。
Throws: 拋出:
Since: 因為:
2.2 2.2
setFileType setFileType
public boolean setFileType (int fileType)公共布爾setFileType (智力文件類型)
throws IOException拋出IOException異常
Sets the file type to be transferred.設置文件類型轉移。 This should be one of FTP.ASCII_FILE_TYPE , FTP.BINARY_FILE_TYPE , etc. The file type only needs to be set when you want to change the type.這應該是一個FTP.ASCII_FILE_TYPE , FTP.BINARY_FILE_TYPE等文件類型只需要設置當你想改變的類型。 After changing it, the new type stays in effect until you change it again.在改變了,新的類型保持有效,直到您再次變更。 The default file type is FTP.ASCII_FILE_TYPE if this method is never called.默認的文件類型是FTP.ASCII_FILE_TYPE如果這種方法不會被調用。
NB currently calling any connect method will reset the mode to ACTIVE_LOCAL_DATA_CONNECTION_MODE. 注:目前可以調用任何方法將復位模式ACTIVE_LOCAL_DATA_CONNECTION_MODE。
Parameters: 參數:
fileType - The _FILE_TYPE constant indcating the type of file. fileType -的_FILE_TYPE不斷indcating的文件類型。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
setFileType setFileType
public boolean setFileType (int fileType,公共布爾setFileType (智力文件類型,
int formatOrByteSize)詮釋formatOrByteSize)
throws IOException拋出IOException異常
Sets the file type to be transferred and the format.設置文件類型和格式傳送。 The type should be one of FTP.ASCII_FILE_TYPE , FTP.BINARY_FILE_TYPE , etc. The file type only needs to be set when you want to change the type.類型應該是一個FTP.ASCII_FILE_TYPE , FTP.BINARY_FILE_TYPE等文件類型只需要設置當你想改變的類型。 After changing it, the new type stays in effect until you change it again.在改變了,新的類型保持有效,直到您再次變更。 The default file type is FTP.ASCII_FILE_TYPE if this method is never called.默認的文件類型是FTP.ASCII_FILE_TYPE如果這種方法不會被調用。 The format should be one of the FTP class TEXT_FORMAT constants, or if the type is FTP.LOCAL_FILE_TYPE , the format should be the byte size for that type.格式應該是一個階級的FTP TEXT_FORMAT常數,或者如果該類型是FTP.LOCAL_FILE_TYPE ,格式應該是該類型的字節大小。 The default format is FTP.NON_PRINT_TEXT_FORMAT if this method is never called.默認格式是FTP.NON_PRINT_TEXT_FORMAT如果這種方法不會被調用。
NB currently calling any connect method will reset the mode to ACTIVE_LOCAL_DATA_CONNECTION_MODE. 注:目前可以調用任何方法將復位模式ACTIVE_LOCAL_DATA_CONNECTION_MODE。
Parameters: 參數:
fileType - The _FILE_TYPE constant indcating the type of file. fileType -的_FILE_TYPE不斷indcating的文件類型。
formatOrByteSize - The format of the file (one of the _FORMAT constants. In the case of LOCAL_FILE_TYPE , the byte size. formatOrByteSize -文件格式的(即一_FORMAT常數。若LOCAL_FILE_TYPE ,字節大小。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
setFileStructure setFileStructure
public boolean setFileStructure (int structure)公共布爾setFileStructure (智力結構)
throws IOException拋出IOException異常
Sets the file structure.設置文件的結構。 The default structure is FTP.FILE_STRUCTURE if this method is never called.默認的結構是FTP.FILE_STRUCTURE如果這種方法不會被調用。
Parameters: 參數:
structure - The structure of the file (one of the FTP class _STRUCTURE constants). structure -文件結構(類之一的FTP _STRUCTURE常量)。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
setFileTransferMode setFileTransferMode
public boolean setFileTransferMode (int mode)公共布爾setFileTransferMode (智力模式)
throws IOException拋出IOException異常
Sets the transfer mode.設置傳輸模式。 The default transfer mode FTP.STREAM_TRANSFER_MODE if this method is never called.默認的傳輸模式FTP.STREAM_TRANSFER_MODE如果這種方法不會被調用。
Parameters: 參數:
mode - The new transfer mode to use (one of the FTP class _TRANSFER_MODE constants). mode -新的傳輸模式使用(一類的FTP _TRANSFER_MODE常量)。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
remoteRetrieve remoteRetrieve
public boolean remoteRetrieve ( String filename)公共布爾remoteRetrieve ( 字符串文件名)
throws IOException拋出IOException異常
Initiate a server to server file transfer.發起一個到服務器的文件傳輸服務器。 This method tells the server to which the client is connected to retrieve a given file from the other server.此方法通知服務器的客戶端連接到其他服務器中檢索從一個給定的文件。
Parameters: 參數:
filename - The name of the file to retrieve. filename -文件名稱檢索。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
remoteStore remoteStore
public boolean remoteStore ( String filename)公共布爾remoteStore ( 字符串文件名)
throws IOException拋出IOException異常
Initiate a server to server file transfer.發起一個到服務器的文件傳輸服務器。 This method tells the server to which the client is connected to store a file on the other server using the given filename.此方法通知服務器的客戶端連接到存儲在其他使用給定的文件名服務器上的文件。 The other server must have had a remoteRetrieve issued to it by another FTPClient.其他服務器必須有一個remoteRetrieve發出另FTPClient給它。
Parameters: 參數:
filename - The name to call the file that is to be stored. filename -這個名字來調用文件要存儲。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
remoteStoreUnique remoteStoreUnique
public boolean remoteStoreUnique ( String filename)公共布爾remoteStoreUnique ( 字符串文件名)
throws IOException拋出IOException異常
Initiate a server to server file transfer.發起一個到服務器的文件傳輸服務器。 This method tells the server to which the client is connected to store a file on the other server using a unique filename based on the given filename.此方法通知服務器的客戶端連接到存儲在其他服務器上的文件使用一個唯一的文件名在給定的文件為基礎。 The other server must have had a remoteRetrieve issued to it by another FTPClient.其他服務器必須有一個remoteRetrieve發出另FTPClient給它。
Parameters: 參數:
filename - The name on which to base the filename of the file that is to be stored. filename -這個名字,在此基礎文件的文件名是被存儲。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
remoteStoreUnique remoteStoreUnique
public boolean remoteStoreUnique ()公共布爾remoteStoreUnique ()
throws IOException拋出IOException異常
Initiate a server to server file transfer.發起一個到服務器的文件傳輸服務器。 This method tells the server to which the client is connected to store a file on the other server using a unique filename.此方法通知服務器的客戶端連接到存儲在其他唯一的文件名使用服務器上的文件。 The other server must have had a remoteRetrieve issued to it by another FTPClient.其他服務器必須有一個remoteRetrieve發出另FTPClient給它。 Many FTP servers require that a base filename be given from which the unique filename can be derived.許多FTP服務器要求給予基礎文件名唯一的文件名從中可以得到。 For those servers use the other version of remoteStoreUnique對於這些服務器使用的版本的其他remoteStoreUnique
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
remoteAppend remoteAppend
public boolean remoteAppend ( String filename)公共布爾remoteAppend ( 字符串文件名)
throws IOException拋出IOException異常
Initiate a server to server file transfer.發起一個到服務器的文件傳輸服務器。 This method tells the server to which the client is connected to append to a given file on the other server.此方法通知服務器的客戶端連接到其他服務器上追加到指定文件。 The other server must have had a remoteRetrieve issued to it by another FTPClient.其他服務器必須有一個remoteRetrieve發出另FTPClient給它。
Parameters: 參數:
filename - The name of the file to be appended to, or if the file does not exist, the name to call the file being stored. filename -文件名稱追加到,或者如果該文件不存在,這個名字來調用文件被存儲。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
completePendingCommand completePendingCommand
public boolean completePendingCommand ()公共布爾completePendingCommand ()
throws IOException拋出IOException異常
There are a few FTPClient methods that do not complete the entire sequence of FTP commands to complete a transaction.有幾個FTPClient方法不完成整個FTP命令序列來完成交易。 These commands require some action by the programmer after the reception of a positive intermediate command.這些命令的一些要求后的一個積極的中級指揮接待程序員行動。 After the programmer's code completes its actions, it must call this method to receive the completion reply from the server and verify the success of the entire transaction.之后,程序員的代碼完成其行動,它必須調用這個方法來接收來自服務器的答復,並確認完成了整個交易的成功。
For example,例如,
InputStream input; InputStream的投入;
OutputStream output; OutputStream的輸出;
input = new FileInputStream("foobaz.txt");輸入=新FileInputStream的(“foobaz.txt”);
output = ftp.storeFileStream("foobar.txt")輸出= ftp.storeFileStream(“foobar.txt”)
if(!FTPReply.isPositiveIntermediate(ftp.getReplyCode())) {如果(!FTPReply.isPositiveIntermediate(ftp.getReplyCode())){
input.close(); input.close();
output.close(); output.close();
ftp.logout(); ftp.logout();
ftp.disconnect(); ftp.disconnect();
System.err.println("File transfer failed."); System.err.println(“文件傳輸失敗。”);
System.exit(1); System.exit(1);
} }
Util.copyStream(input, output); Util.copyStream(輸入,輸出);
input.close(); input.close();
output.close(); output.close();
// Must call completePendingCommand() to finish command. / /必須調用completePendingCommand()來完成命令。
if(!ftp.completePendingCommand()) {如果(!ftp.completePendingCommand()){
ftp.logout(); ftp.logout();
ftp.disconnect(); ftp.disconnect();
System.err.println("File transfer failed."); System.err.println(“文件傳輸失敗。”);
System.exit(1); System.exit(1);
} }
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
retrieveFile retrieveFile
public boolean retrieveFile ( String remote,公共布爾retrieveFile ( 弦樂遙遠,
OutputStream local) OutputStream的地方)
throws IOException拋出IOException異常
Retrieves a named file from the server and writes it to the given OutputStream.從服務器檢索命名文件並將其寫入給定的OutputStream。 This method does NOT close the given OutputStream.這種方法不會關閉給定的OutputStream。 If the current file type is ASCII, line separators in the file are converted to the local representation.如果當前文件類型是ASCII,文件中的行分隔符轉換為當地代表性。
Note: if you have used setRestartOffset(long) , the file data will start from the selected offset.注:如果您使用過setRestartOffset(long) ,該文件的數據將開始從選定的偏移。
Parameters: 參數:
remote - The name of the remote file. remote -文件名遙控器。
local - The local OutputStream to which to write the file. local -當地的OutputStream要寫入文件。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
CopyStreamException - If an I/O error occurs while actually transferring the file. CopyStreamException -如果發生I / O錯誤,而實際上傳輸文件。 The CopyStreamException allows you to determine the number of bytes transferred and the IOException causing the error.該CopyStreamException允許你確定傳輸的字節數和IOException異常導致錯誤。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
retrieveFileStream retrieveFileStream
public InputStream retrieveFileStream ( String remote)公眾的InputStream retrieveFileStream ( 字符串遠程)
throws IOException拋出IOException異常
Returns an InputStream from which a named file from the server can be read.返回從其中一個指定的文件從服務器可以讀取的InputStream。 If the current file type is ASCII, the returned InputStream will convert line separators in the file to the local representation.如果當前文件類型是ASCII,返回的InputStream將轉換文件中的行分隔符到本地的代表性。 You must close the InputStream when you finish reading from it.您必須關閉InputStream的當你完成從它讀。 The InputStream itself will take care of closing the parent data connection socket upon being closed.本身的InputStream將被關閉,關閉后父數據連接插座的照顧。 To finalize the file transfer you must call completePendingCommand and check its return value to verify success.為了完成文件傳輸你必須調用completePendingCommand並檢查它的返回值來驗證成功。
Note: if you have used setRestartOffset(long) , the file data will start from the selected offset.注:如果您使用過setRestartOffset(long) ,該文件的數據將開始從選定的偏移。
Parameters: 參數:
remote - The name of the remote file. remote -文件名遙控器。
Returns: 返回:
An InputStream from which the remote file can be read.一個InputStream,從中可以讀取遠程文件。 If the data connection cannot be opened (eg, the file does not exist), null is returned (in which case you may check the reply code to determine the exact reason for failure).如果數據連接不能打開(例如,文件不存在),則返回null(在這種情況下,您可以檢查答復代碼以確定失敗的確切原因)。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
storeFile storeFile
public boolean storeFile ( String remote,公共布爾storeFile ( 弦樂遙遠,
InputStream local) InputStream的地方)
throws IOException拋出IOException異常
Stores a file on the server using the given name and taking input from the given InputStream.存儲一個使用給定的名稱,並采取從給定的InputStream輸入服務器的文件。 This method does NOT close the given InputStream.這種方法不會關閉給定的InputStream。 If the current file type is ASCII, line separators in the file are transparently converted to the NETASCII format (ie, you should not attempt to create a special InputStream to do this).如果當前文件類型是ASCII,文件中的行分隔符轉換為NETASCII透明格式(比如,你不應該試圖建立一個特別的InputStream要做到這一點)。
Parameters: 參數:
remote - The name to give the remote file. remote -這個名字給遠程文件。
local - The local InputStream from which to read the file. local -當地的InputStream從中讀取文件。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
CopyStreamException - If an I/O error occurs while actually transferring the file. CopyStreamException -如果發生I / O錯誤,而實際上傳輸文件。 The CopyStreamException allows you to determine the number of bytes transferred and the IOException causing the error.該CopyStreamException允許你確定傳輸的字節數和IOException異常導致錯誤。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
storeFileStream storeFileStream
public OutputStream storeFileStream ( String remote)公眾的OutputStream storeFileStream ( 字符串遠程)
throws IOException拋出IOException異常
Returns an OutputStream through which data can be written to store a file on the server using the given name.返回一個通過該數據可以被寫入存儲在使用給定的名稱服務器上的文件的OutputStream。 If the current file type is ASCII, the returned OutputStream will convert line separators in the file to the NETASCII format (ie, you should not attempt to create a special OutputStream to do this).如果當前文件類型是ASCII,返回的OutputStream將轉換文件中的行分隔符的NETASCII格式(比如,你不應該試圖建立一個特別的OutputStream要做到這一點)。 You must close the OutputStream when you finish writing to it.您必須關閉的OutputStream當你寫完它。 The OutputStream itself will take care of closing the parent data connection socket upon being closed.本身的OutputStream將被關閉,關閉后父數據連接插座的照顧。 To finalize the file transfer you must call completePendingCommand and check its return value to verify success.為了完成文件傳輸你必須調用completePendingCommand並檢查它的返回值來驗證成功。
Parameters: 參數:
remote - The name to give the remote file. remote -這個名字給遠程文件。
Returns: 返回:
An OutputStream through which the remote file can be written.一個OutputStream通過該遠程文件可寫。 If the data connection cannot be opened (eg, the file does not exist), null is returned (in which case you may check the reply code to determine the exact reason for failure).如果數據連接不能打開(例如,文件不存在),則返回null(在這種情況下,您可以檢查答復代碼以確定失敗的確切原因)。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
appendFile appendFile
public boolean appendFile ( String remote,公共布爾appendFile ( 弦樂遙遠,
InputStream local) InputStream的地方)
throws IOException拋出IOException異常
Appends to a file on the server with the given name, taking input from the given InputStream.上的一個帶有特定名稱的服務器上的文件追加,即從定InputStream輸入。 This method does NOT close the given InputStream.這種方法不會關閉給定的InputStream。 If the current file type is ASCII, line separators in the file are transparently converted to the NETASCII format (ie, you should not attempt to create a special InputStream to do this).如果當前文件類型是ASCII,文件中的行分隔符轉換為NETASCII透明格式(比如,你不應該試圖建立一個特別的InputStream要做到這一點)。
Parameters: 參數:
remote - The name of the remote file. remote -文件名遙控器。
local - The local InputStream from which to read the data to be appended to the remote file. local -當地的InputStream從中讀取數據被追加到遠程文件。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
CopyStreamException - If an I/O error occurs while actually transferring the file. CopyStreamException -如果發生I / O錯誤,而實際上傳輸文件。 The CopyStreamException allows you to determine the number of bytes transferred and the IOException causing the error.該CopyStreamException允許你確定傳輸的字節數和IOException異常導致錯誤。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
appendFileStream appendFileStream
public OutputStream appendFileStream ( String remote)公眾的OutputStream appendFileStream ( 字符串遠程)
throws IOException拋出IOException異常
Returns an OutputStream through which data can be written to append to a file on the server with the given name.返回一個通過該數據可以被寫入附加的帶有特定名稱的服務器上的文件的OutputStream。 If the current file type is ASCII, the returned OutputStream will convert line separators in the file to the NETASCII format (ie, you should not attempt to create a special OutputStream to do this).如果當前文件類型是ASCII,返回的OutputStream將轉換文件中的行分隔符的NETASCII格式(比如,你不應該試圖建立一個特別的OutputStream要做到這一點)。 You must close the OutputStream when you finish writing to it.您必須關閉的OutputStream當你寫完它。 The OutputStream itself will take care of closing the parent data connection socket upon being closed.本身的OutputStream將被關閉,關閉后父數據連接插座的照顧。 To finalize the file transfer you must call completePendingCommand and check its return value to verify success.為了完成文件傳輸你必須調用completePendingCommand並檢查它的返回值來驗證成功。
Parameters: 參數:
remote - The name of the remote file. remote -文件名遙控器。
Returns: 返回:
An OutputStream through which the remote file can be appended.一個OutputStream通過該遠程文件可以追加。 If the data connection cannot be opened (eg, the file does not exist), null is returned (in which case you may check the reply code to determine the exact reason for failure).如果數據連接不能打開(例如,文件不存在),則返回null(在這種情況下,您可以檢查答復代碼以確定失敗的確切原因)。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
storeUniqueFile storeUniqueFile
public boolean storeUniqueFile ( String remote,公共布爾storeUniqueFile ( 弦樂遙遠,
InputStream local) InputStream的地方)
throws IOException拋出IOException異常
Stores a file on the server using a unique name derived from the given name and taking input from the given InputStream.使用上存儲一個唯一的名稱從給定的名稱和給定的InputStream輸入導出到服務器上的文件。 This method does NOT close the given InputStream.這種方法不會關閉給定的InputStream。 If the current file type is ASCII, line separators in the file are transparently converted to the NETASCII format (ie, you should not attempt to create a special InputStream to do this).如果當前是ASCII文件類型,文件中的行分隔符轉換為NETASCII透明格式(比如,你不應該試圖創建一個特殊的InputStream要做到這一點)。
Parameters: 參數:
remote - The name on which to base the unique name given to the remote file. remote -這個名字,在此基礎獨特的名字給遠程文件。
local - The local InputStream from which to read the file. local -當地的InputStream從中讀取文件。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
CopyStreamException - If an I/O error occurs while actually transferring the file. CopyStreamException -如果發生I / O錯誤,而實際上傳輸文件。 The CopyStreamException allows you to determine the number of bytes transferred and the IOException causing the error.該CopyStreamException允許你確定傳輸的字節數和IOException異常導致錯誤。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
storeUniqueFileStream storeUniqueFileStream
public OutputStream storeUniqueFileStream ( String remote)公眾的OutputStream storeUniqueFileStream ( 字符串遠程)
throws IOException拋出IOException異常
Returns an OutputStream through which data can be written to store a file on the server using a unique name derived from the given name.通過返回一個可寫入的數據存儲上使用一個唯一的名稱從給定的名稱派生服務器上的文件的OutputStream。 If the current file type is ASCII, the returned OutputStream will convert line separators in the file to the NETASCII format (ie, you should not attempt to create a special OutputStream to do this).如果當前文件類型是ASCII,返回的OutputStream將轉換文件中的行分隔符的NETASCII格式(比如,你不應該試圖建立一個特別的OutputStream要做到這一點)。 You must close the OutputStream when you finish writing to it.您必須關閉的OutputStream當你寫完它。 The OutputStream itself will take care of closing the parent data connection socket upon being closed.本身的OutputStream將被關閉,關閉后父數據連接插座的照顧。 To finalize the file transfer you must call completePendingCommand and check its return value to verify success.為了完成文件傳輸你必須調用completePendingCommand並檢查它的返回值來驗證成功。
Parameters: 參數:
remote - The name on which to base the unique name given to the remote file. remote -這個名字,在此基礎獨特的名字給遠程文件。
Returns: 返回:
An OutputStream through which the remote file can be written.一個OutputStream通過該遠程文件可寫。 If the data connection cannot be opened (eg, the file does not exist), null is returned (in which case you may check the reply code to determine the exact reason for failure).如果數據連接不能打開(例如,文件不存在),則返回null(在這種情況下,您可以檢查答復代碼以確定失敗的確切原因)。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
storeUniqueFile storeUniqueFile
public boolean storeUniqueFile ( InputStream local)公共布爾storeUniqueFile ( InputStream的地方)
throws IOException拋出IOException異常
Stores a file on the server using a unique name assigned by the server and taking input from the given InputStream.使用上存儲一個唯一的名稱由服務器和從給定的InputStream輸入到指定的服務器上的文件。 This method does NOT close the given InputStream.這種方法不會關閉給定的InputStream。 If the current file type is ASCII, line separators in the file are transparently converted to the NETASCII format (ie, you should not attempt to create a special InputStream to do this).如果當前文件類型是ASCII,文件中的行分隔符轉換為NETASCII透明格式(比如,你不應該試圖建立一個特別的InputStream要做到這一點)。
Parameters: 參數:
local - The local InputStream from which to read the file. local -當地的InputStream從中讀取文件。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
CopyStreamException - If an I/O error occurs while actually transferring the file. CopyStreamException -如果發生I / O錯誤,而實際上傳輸文件。 The CopyStreamException allows you to determine the number of bytes transferred and the IOException causing the error.該CopyStreamException允許你確定傳輸的字節數和IOException異常導致錯誤。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
storeUniqueFileStream storeUniqueFileStream
public OutputStream storeUniqueFileStream ()公眾的OutputStream storeUniqueFileStream ()
throws IOException拋出IOException異常
Returns an OutputStream through which data can be written to store a file on the server using a unique name assigned by the server.通過返回一個可寫入的數據存儲上使用一個唯一的名稱由服務器分配服務器上的文件的OutputStream。 If the current file type is ASCII, the returned OutputStream will convert line separators in the file to the NETASCII format (ie, you should not attempt to create a special OutputStream to do this).如果當前文件類型是ASCII,返回的OutputStream將轉換該文件中的行分隔符的NETASCII格式(比如,你不應該試圖建立一個特別的OutputStream要做到這一點)。 You must close the OutputStream when you finish writing to it.您必須關閉的OutputStream當你寫完它。 The OutputStream itself will take care of closing the parent data connection socket upon being closed.本身的OutputStream將被關閉,關閉后父數據連接插座的照顧。 To finalize the file transfer you must call completePendingCommand and check its return value to verify success.為了完成文件傳輸你必須調用completePendingCommand並檢查它的返回值來驗證成功。
Returns: 返回:
An OutputStream through which the remote file can be written.一個OutputStream通過該遠程文件可寫。 If the data connection cannot be opened (eg, the file does not exist), null is returned (in which case you may check the reply code to determine the exact reason for failure).如果數據連接不能打開(例如,文件不存在),則返回null(在這種情況下,您可以檢查答復代碼以確定失敗的確切原因)。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
allocate分配
public boolean allocate (int bytes)公共布爾分配 (智力字節)
throws IOException拋出IOException異常
Reserve a number of bytes on the server for the next file transfer.保留一字節的下一個文件傳輸服務器數量。
Parameters: 參數:
bytes - The number of bytes which the server should allocate. bytes -字節數的分配,服務器應該。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
features特征
public boolean features ()公共布爾特征 ()
throws IOException拋出IOException異常
Query the server for supported features.查詢支持的功能服務器。 The server may reply with a list of server-supported exensions.服務器可能會回復了服務器支持exensions名單。 For example, a typical client-server interaction might be (from RFC 2289):例如,一個典型的客戶機服務器相互作用可能是(從RFC 2289):
C> feat ç>壯舉
S> 211-Extensions supported: S> 211 -擴展支持:
S> MLST size*;create;modify*;perm;media-type S> MLST大小*;創造;修改*,燙發,媒體類型
S> SIZE S>尺寸
S> COMPRESSION S>壓縮
S> MDTM S> MDTM
S> 211 END S> 211完
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
Since: 因為:
2.2 2.2
See Also: 另見:
http://www.faqs.org/rfcs/rfc2389.html http://www.faqs.org/rfcs/rfc2389.html
allocate分配
public boolean allocate (int bytes,公共布爾分配 (智力字節,
int recordSize)詮釋的recordsize)
throws IOException拋出IOException異常
Reserve space on the server for the next file transfer.儲備空間,為下一個文件傳輸服務器。
Parameters: 參數:
bytes - The number of bytes which the server should allocate. bytes -字節數的分配,服務器應該。
recordSize - The size of a file record. recordSize -記錄大小的文件。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
setRestartOffset setRestartOffset
public void setRestartOffset (long offset)公共無效setRestartOffset (長偏移)
Sets the restart offset.設置重新啟動所抵消。 The restart command is sent to the server only before sending the file transfer command.重新啟動命令發送到服務器前,只發送文件傳輸命令。 When this is done, the restart marker is reset to zero.當這完成,重新啟動標記重置為零。
Parameters: 參數:
offset - The offset into the remote file at which to start the next file transfer. offset -偏移到遠程文件要開始下一個文件傳輸。 This must be a value greater than or equal to zero.這必須是一個大於或等於零。
getRestartOffset getRestartOffset
public long getRestartOffset ()眾長getRestartOffset ()
Fetches the restart offset.擷取重新啟動所抵消。
Returns: 返回:
offset The offset into the remote file at which to start the next file transfer.遠程文件偏移量,偏移量開始下一個文件傳輸。
rename重命名
public boolean rename ( String from,公共布爾命名 ( 字符串從,
throws IOException拋出IOException異常
Renames a remote file.重命名遠程文件。
Parameters: 參數:
from - The name of the remote file to rename. from -文件名遙控器來重命名。
to - The new name of the remote file. to -遠程文件的新名稱。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
abort退出
public boolean abort ()公共布爾中止 ()
throws IOException拋出IOException異常
Abort a transfer in progress.中止正在進行的傳輸。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
deleteFile的DeleteFile
public boolean deleteFile ( String pathname)公共布爾的DeleteFile ( 字符串路徑名)
throws IOException拋出IOException異常
Deletes a file on the FTP server.刪除在FTP服務器上的文件。
Parameters: 參數:
pathname - The pathname of the file to be deleted. pathname -文件路徑名被刪除。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
removeDirectory removeDirectory
public boolean removeDirectory ( String pathname)公共布爾removeDirectory ( 字符串路徑名)
throws IOException拋出IOException異常
Removes a directory on the FTP server (if empty).刪除在FTP服務器(如果是空的)目錄。
Parameters: 參數:
pathname - The pathname of the directory to remove. pathname -刪除路徑名的目錄。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
makeDirectory makeDirectory
public boolean makeDirectory ( String pathname)公共布爾makeDirectory ( 字符串路徑名)
throws IOException拋出IOException異常
Creates a new subdirectory on the FTP server in the current directory (if a relative pathname is given) or where specified (if an absolute pathname is given).在上創建一個FTP服務器的當前目錄的子目錄(如果給出一個相對路徑名),或在指定的(如果給出一個絕對路徑名)。
Parameters: 參數:
pathname - The pathname of the directory to create. pathname -創建路徑名的目錄。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
printWorkingDirectory printWorkingDirectory
public String printWorkingDirectory ()公共字符串 printWorkingDirectory ()
throws IOException拋出IOException異常
Returns the pathname of the current working directory.返回當前工作目錄的路徑名。
Returns: 返回:
The pathname of the current working directory.當前工作目錄的路徑名。 If it cannot be obtained, returns null.如果不能獲得,則返回null。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
sendSiteCommand sendSiteCommand
public boolean sendSiteCommand ( String arguments)公共布爾sendSiteCommand ( 字符串參數)
throws IOException拋出IOException異常
Send a site specific command.發送一個站點特定的命令。
Parameters: 參數:
arguments - The site specific command and arguments. arguments -該網站的具體命令和參數。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
getSystemName getSystemName
public String getSystemName ()公共字符串 getSystemName ()
throws IOException拋出IOException異常
Deprecated. Use getSystemType() - which does not return null. 。棄用 使用getSystemType() -不返回null。 Will be deleted in version 3.0 將3.0版中刪除
Fetches the system type name from the server and returns the string.從服務器獲取並返回字符串系統類型的名稱。 This value is cached for the duration of the connection after the first call to this method.這個值是緩存后的第一次調用此方法連接的持續時間。 In other words, only the first time that you invoke this method will it issue a SYST command to the FTP server.換句話說,只有第一次調用此方法將它發出SYST命令到FTP服務器。 FTPClient will remember the value and return the cached value until a call to disconnect. FTPClient會記得值,並返回到調用斷開緩存值。
Returns: 返回:
The system type name obtained from the server.該系統類型的名稱取自服務器。 null if the information could not be obtained. NULL,如果無法獲得的信息。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
getSystemType getSystemType
public String getSystemType ()公共字符串 getSystemType ()
throws IOException拋出IOException異常
Fetches the system type from the server and returns the string.從服務器獲取並返回字符串系統類型。 This value is cached for the duration of the connection after the first call to this method.這個值是緩存后的第一次調用此方法連接的持續時間。 In other words, only the first time that you invoke this method will it issue a SYST command to the FTP server.換句話說,只有第一次調用此方法將它發出SYST命令到FTP服務器。 FTPClient will remember the value and return the cached value until a call to disconnect. FTPClient會記得值,並返回到調用斷開緩存值。
Returns: 返回:
The system type obtained from the server.該系統從服務器獲得的類型。 Never null.切勿空。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
Since: 因為:
2.2 2.2
listHelp listHelp
public String listHelp ()公共字符串 listHelp ()
throws IOException拋出IOException異常
Fetches the system help information from the server and returns the full string.從服務器獲取系統幫助信息並返回完整的字符串。
Returns: 返回:
The system help string obtained from the server.該系統的幫助下從服務器獲得的字符串。 null if the information could not be obtained. NULL,如果無法獲得的信息。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
listHelp listHelp
public String listHelp ( String command)公共字符串 listHelp ( 字符串命令)
throws IOException拋出IOException異常
Fetches the help information for a given command from the server and returns the full string.為獲取從服務器提供的命令的幫助信息,並返回完整的字符串。
Parameters: 參數:
command - The command on which to ask for help. command -命令在其上尋求幫助。
Returns: 返回:
The command help string obtained from the server.該命令的幫助字符串獲得服務器。 null if the information could not be obtained. NULL,如果無法獲得的信息。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
sendNoOp sendNoOp
public boolean sendNoOp ()公共布爾sendNoOp ()
throws IOException拋出IOException異常
Sends a NOOP command to the FTP server.發送一個NOOP命令到FTP服務器。 This is useful for preventing server timeouts.這是為防止服務器超時有用。
Returns: 返回:
True if successfully completed, false if not. True如果成功完成,否則為false。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
listNames listNames
public String [] listNames ( String pathname)公共字符串 [] listNames ( 字符串路徑名)
throws IOException拋出IOException異常
Obtain a list of filenames in a directory (or just the name of a given file, which is not particularly useful).獲取列表中一個目錄(或者僅僅是對一個給定的文件,它是不是特別有用的名稱)文件名。 This information is obtained through the NLST command.獲得這些信息通過NLST命令。 If the given pathname is a directory and contains no files, a zero length array is returned only if the FTP server returned a positive completion code, otherwise null is returned (the FTP server returned a 550 error No files found.).如果給定的路徑名是一個目錄,不包含任何文件,一個零長度數組只返回如果FTP服務器返回一個積極的完成代碼,否則返回null(在FTP服務器返回一個550錯誤號文件中找到。)。 If the directory is not empty, an array of filenames in the directory is returned.如果該目錄不是空的,一個目錄中的文件名數組返回。 If the pathname corresponds to a file, only that file will be listed.如果路徑名對應一個文件,只是文件將陸續上市。 The server may or may not expand glob expressions.服務器可能會或可能不會擴大glob表達式。
Parameters: 參數:
pathname - The file or directory to list. pathname -文件或目錄清單。
Returns: 返回:
The list of filenames contained in the given path.清單中的文件名在給定的路徑。 null if the list could not be obtained.如果列表為空無法取得。 If there are no filenames in the directory, a zero-length array is returned.如果在目錄中沒有文件名,一個零長度的數組返回。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
listNames listNames
public String [] listNames ()公共字符串 [] listNames ()
throws IOException拋出IOException異常
Obtain a list of filenames in the current working directory This information is obtained through the NLST command.獲取當前工作目錄的文件名列表,這個信息是通過獲得NLST命令。 If the current directory contains no files, a zero length array is returned only if the FTP server returned a positive completion code, otherwise, null is returned (the FTP server returned a 550 error No files found.).如果當前目錄不包含任何文件,一個零長度的數組返回只有當FTP服務器返回了積極的完成代碼,否則,返回null(在FTP服務器返回一個550錯誤號文件中找到。)。 If the directory is not empty, an array of filenames in the directory is returned.如果該目錄不是空的,一個目錄中的文件名數組返回。
Returns: 返回:
The list of filenames contained in the current working directory.清單中的文件名在當前工作目錄。 null if the list could not be obtained.如果列表為空無法取得。 If there are no filenames in the directory, a zero-length array is returned.如果在目錄中沒有文件名,一個零長度的數組返回。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
listFiles listfiles <套件
public FTPFile [] listFiles ( String pathname)公共FTPFile [] listfiles <套件 ( 字符串路徑名)
throws IOException拋出IOException異常
Using the default system autodetect mechanism, obtain a list of file information for the current working directory or for just a single file.使用默認的系統自動檢測機制,獲取當前工作目錄或只是一個單一的文件檔案資料清單。
This information is obtained through the LIST command.獲得這些信息通過list命令。 The contents of the returned array is determined by the FTPFileEntryParser used.返回的數組的內容是由FTPFileEntryParser使用。
Parameters: 參數:
pathname - The file or directory to list. pathname -文件或目錄清單。 Since the server may or may not expand glob expressions, using them here is not recommended and may well cause this method to fail.由於服務器可能會或可能不會擴大glob表達式,使用起來這里不推薦,很可能導致這個方法失敗。
Returns: 返回:
The list of file information contained in the given path in the format determined by the autodetection mechanism信息表的文件在給定的路徑中包含由自動檢測機制確定的格式
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
ParserInitializationException - Thrown if the parserKey parameter cannot be resolved by the selected parser factory. ParserInitializationException -拋出如果parserKey參數不能被選中的解決解析器工廠。 In the DefaultFTPEntryParserFactory, this will happen when parserKey is neither the fully qualified class name of a class implementing the interface org.apache.commons.net.ftp.FTPFileEntryParser nor a string containing one of the recognized keys mapping to such a parser or if class loader security issues prevent its being loaded.在DefaultFTPEntryParserFactory,這將發生在parserKey既不是一個實現該接口org.apache.commons.net.ftp.FTPFileEntryParser,也不是一個字符串,其中包含一個確認鍵映射到這樣一個分析器或者類的類的全限定類名裝載機安全問題防止其被加載。
See Also: 另見:
DefaultFTPFileEntryParserFactory , FTPFileEntryParserFactory , FTPFileEntryParser DefaultFTPFileEntryParserFactory , FTPFileEntryParserFactory , FTPFileEntryParser
listFiles listfiles <套件
public FTPFile [] listFiles ()公共FTPFile [] listfiles <套件 ()
throws IOException拋出IOException異常
Using the default system autodetect mechanism, obtain a list of file information for the current working directory.使用默認的系統自動檢測機制,獲取當前工作目錄的文件資料清單。
This information is obtained through the LIST command.獲得這些信息通過list命令。 The contents of the returned array is determined by the FTPFileEntryParser used.返回的數組的內容是由FTPFileEntryParser使用。
Returns: 返回:
The list of file information contained in the current directory in the format determined by the autodetection mechanism.該文件中包含的信息的列表中自動檢測機制決定的格式的當前目錄。
NOTE: This array may contain null members if any of the individual file listings failed to parse. 注意:此數組可能包含空成員,如果上市文件的任何個人無法解析。 The caller should check each entry for null before referencing it.調用者前,必須核對每個空引用它的條目。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
ParserInitializationException - Thrown if the parserKey parameter cannot be resolved by the selected parser factory. ParserInitializationException -拋出如果parserKey參數不能被選中的解決解析器工廠。 In the DefaultFTPEntryParserFactory, this will happen when parserKey is neither the fully qualified class name of a class implementing the interface org.apache.commons.net.ftp.FTPFileEntryParser nor a string containing one of the recognized keys mapping to such a parser or if class loader security issues prevent its being loaded.在DefaultFTPEntryParserFactory,這將發生在parserKey既不是一個實現該接口org.apache.commons.net.ftp.FTPFileEntryParser,也不是一個字符串,其中包含一個確認鍵映射到這樣一個分析器或者類的類的全限定類名裝載機安全問題防止其被加載。
See Also: 另見:
DefaultFTPFileEntryParserFactory , FTPFileEntryParserFactory , FTPFileEntryParser DefaultFTPFileEntryParserFactory , FTPFileEntryParserFactory , FTPFileEntryParser
listFiles listfiles <套件
public FTPFile [] listFiles ( String pathname,公共FTPFile [] listfiles <套件 ( 字符串路徑名,
FTPFileFilter filter) FTPFileFilter過濾器)
throws IOException拋出IOException異常
Version of listFiles(String) which allows a filter to be provided.從版本listFiles(String)它允許提供過濾器的人。 For example: listFiles("site", FTPFileFilters.DIRECTORY);例如: listFiles("site", FTPFileFilters.DIRECTORY);
Parameters: 參數:
pathname - the initial path, may be null pathname -初始路徑,可以為null
filter - the filter, non-null filter -過濾器,非空
Returns: 返回:
the list of FTPFile entries.對FTPFile項目清單。
Throws: 拋出:
Since: 因為:
2.2 2.2
initiateListParsing initiateListParsing
public FTPListParseEngine initiateListParsing ()公共FTPListParseEngine initiateListParsing ()
throws IOException拋出IOException異常
Using the default autodetect mechanism, initialize an FTPListParseEngine object containing a raw file information for the current working directory on the server This information is obtained through the LIST command.使用默認的自動檢測機制,初始化FTPListParseEngine對象,包含了當前工作的這些信息是通過LIST命令獲取服務器目錄中的原始文件信息。 This object is then capable of being iterated to return a sequence of FTPFile objects with information filled in by the FTPFileEntryParser used.然后,這個對象能夠被迭代的,以信息來填充返回對象FTPFile一序列FTPFileEntryParser使用。
This method differs from using the listFiles() methods in that expensive FTPFile objects are not created until needed which may be an advantage on large lists.此方法不同於使用listfiles <套件(),因為昂貴的FTPFile不創建對象的方法之前,需要的可能是一個大名單的優勢。
Returns: 返回:
A FTPListParseEngine object that holds the raw information and is capable of providing parsed FTPFile objects, one for each file containing information contained in the given path in the format determined by the parser parameter.一個FTPListParseEngine對象,保存原始資料,是能夠通過提供解析FTPFile對象,每一個確定的格式文件,其中包含的信息是包含在給定路徑parser參數。 Null will be returned if a data connection cannot be opened.如果將返回空數據連接無法打開。 If the current working directory contains no files, an empty array will be the return.如果當前的工作目錄包含任何文件,將一個空數組返回。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
ParserInitializationException - Thrown if the autodetect mechanism cannot resolve the type of system we are connected with. ParserInitializationException -拋出,如果不能自動檢測機制,解決與類型的系統,我們都是相連的。
See Also: 另見:
initiateListParsing initiateListParsing
public FTPListParseEngine initiateListParsing ( String pathname)公共FTPListParseEngine initiateListParsing ( 字符串路徑名)
throws IOException拋出IOException異常
Using the default autodetect mechanism, initialize an FTPListParseEngine object containing a raw file information for the supplied directory.使用默認的自動檢測機制,初始化FTPListParseEngine對象,包含了原始文件所提供的目錄信息。 This information is obtained through the LIST command.獲得這些信息通過list命令。 This object is then capable of being iterated to return a sequence of FTPFile objects with information filled in by the FTPFileEntryParser used.然后,這個對象能夠被迭代的,以信息來填充返回對象FTPFile一序列FTPFileEntryParser使用。
The server may or may not expand glob expressions.服務器可能會或可能不會擴大glob表達式。 You should avoid using glob expressions because the return format for glob listings differs from server to server and will likely cause this method to fail.你應該避免使用glob表達式,因為上市的水珠返回格式不同於服務器到服務器,將可能導致這個方法失敗。
This method differs from using the listFiles() methods in that expensive FTPFile objects are not created until needed which may be an advantage on large lists.此方法不同於使用listfiles <套件(),因為昂貴的FTPFile不創建對象的方法之前,需要的可能是一個大名單的優勢。
FTPClient f=FTPClient(); FTPClient f = FTPClient();
f.connect(server); f.connect(服務器);
f.login(username, password); f.login(用戶名,密碼);
FTPListParseEngine engine = f.initiateListParsing(directory); FTPListParseEngine引擎= f.initiateListParsing(目錄);
while (engine.hasNext()) {而(engine.hasNext()){
FTPFile[] files = engine.getNext(25); // "page size" you want FTPFile []文件= engine.getNext(25); / /“頁面大小”你想要
//do whatever you want with these files, display them, etc. / /做你想做這些文件,顯示它們,等
//expensive FTPFile objects not created until needed. / /昂貴FTPFile不創建對象,直到需要。
} }
Returns: 返回:
A FTPListParseEngine object that holds the raw information and is capable of providing parsed FTPFile objects, one for each file containing information contained in the given path in the format determined by the parser parameter.一個FTPListParseEngine對象,保存原始資料,是能夠通過提供解析FTPFile對象,每一個確定的格式文件,其中包含的信息是包含在給定路徑parser參數。 Null will be returned if a data connection cannot be opened.如果將返回空數據連接無法打開。 If the current working directory contains no files, an empty array will be the return.如果當前的工作目錄包含任何文件,將一個空數組返回。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
ParserInitializationException - Thrown if the autodetect mechanism cannot resolve the type of system we are connected with. ParserInitializationException -拋出,如果不能自動檢測機制,解決與類型的系統,我們都是相連的。
See Also: 另見:
initiateListParsing initiateListParsing
public FTPListParseEngine initiateListParsing ( String parserKey,公共FTPListParseEngine initiateListParsing ( 弦樂 parserKey,
throws IOException拋出IOException異常
Using the supplied parser key, initialize an FTPListParseEngine object containing a raw file information for the supplied directory.使用提供的解析器的關鍵,初始化FTPListParseEngine對象,包含了原始文件所提供的目錄信息。 This information is obtained through the LIST command.獲得這些信息通過list命令。 This object is then capable of being iterated to return a sequence of FTPFile objects with information filled in by the FTPFileEntryParser used.然后,這個對象能夠被迭代的,以信息來填充返回對象FTPFile一序列FTPFileEntryParser使用。
The server may or may not expand glob expressions.服務器可能會或可能不會擴大glob表達式。 You should avoid using glob expressions because the return format for glob listings differs from server to server and will likely cause this method to fail.你應該避免使用glob表達式,因為上市的水珠返回格式不同於服務器到服務器,將可能導致這個方法失敗。
This method differs from using the listFiles() methods in that expensive FTPFile objects are not created until needed which may be an advantage on large lists.此方法不同於使用listfiles <套件(),因為昂貴的FTPFile不創建對象的方法之前,需要的可能是一個大名單的優勢。
Parameters: 參數:
parserKey - A string representing a designated code or fully-qualified class name of an FTPFileEntryParser that should be used to parse each server file listing. parserKey -一個字符串,代表一個指定的代碼或限定類名的全FTPFileEntryParser應該用來分析每個服務器文件列表。
Returns: 返回:
A FTPListParseEngine object that holds the raw information and is capable of providing parsed FTPFile objects, one for each file containing information contained in the given path in the format determined by the parser parameter.一個FTPListParseEngine對象,保存原始資料,是能夠通過提供解析FTPFile對象,每一個確定的格式文件,其中包含的信息是包含在給定路徑parser參數。 Null will be returned if a data connection cannot be opened.如果將返回空數據連接無法打開。 If the current working directory contains no files, an empty array will be the return.如果當前的工作目錄包含任何文件,將一個空數組返回。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
ParserInitializationException - Thrown if the parserKey parameter cannot be resolved by the selected parser factory. ParserInitializationException -拋出如果parserKey參數不能被選中的解決解析器工廠。 In the DefaultFTPEntryParserFactory, this will happen when parserKey is neither the fully qualified class name of a class implementing the interface org.apache.commons.net.ftp.FTPFileEntryParser nor a string containing one of the recognized keys mapping to such a parser or if class loader security issues prevent its being loaded.在DefaultFTPEntryParserFactory,這將發生在parserKey既不是一個實現該接口org.apache.commons.net.ftp.FTPFileEntryParser,也不是一個字符串,其中包含一個確認鍵映射到這樣一個分析器或者類的類的全限定類名裝載機安全問題防止其被加載。
See Also: 另見:
getListArguments getListArguments
protected String getListArguments ( String pathname)保護字符串 getListArguments ( 字符串路徑名)
Since: 因為:
2.0 2.0
getStatus getStatus
public String getStatus ()公共字符串 getStatus ()
throws IOException拋出IOException異常
Issue the FTP STAT command to the server. STAT命令發出的FTP服務器。
Returns: 返回:
The status information returned by the server.返回的狀態信息的服務器。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
getStatus getStatus
public String getStatus ( String pathname)公共字符串 getStatus ( 字符串路徑名)
throws IOException拋出IOException異常
Issue the FTP STAT command to the server for a given pathname. STAT命令發出的FTP的服務器為給定的路徑名。 This should produce a listing of the file or directory.本應產生的文件或目錄清單。
Returns: 返回:
The status information returned by the server.返回的狀態信息的服務器。
Throws: 拋出:
FTPConnectionClosedException - If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. FTPConnectionClosedException -如果FTP服務器過早關閉連接的代碼421,結果答復的客戶端被閑置或其他原因導致服務器發送的FTP。 This exception may be caught either as an IOException or independently as itself.此異常可能陷於無論是作為一個IOException或本身獨立。
IOException - If an I/O error occurs while either sending a command to the server or receiving a reply from the server. IOException -如果發生I / O錯誤發生,而不是一個命令發送到服務器或接收服務器響應從。
getModificationTime getModificationTime
public String getModificationTime ( String pathname)公共字符串 getModificationTime ( 字符串路徑名)
throws IOException拋出IOException異常
Issue the FTP MDTM command (not supported by all servers to retrieve the last modification time of a file. The modification string should be in the ISO 3077 form "YYYYMMDDhhmmss(.xxx)?". The timestamp represented should also be in GMT, but not all FTP servers honour this.問題的FTP MDTM命令(不支持所有的服務器來檢索文件的最后修改時間。字符串的修改應在ISO 3077表“YYYYMMDDhhmmss(。三十)?”。時間戳代表也應該在格林尼治標准時間,但並非所有的FTP服務器,這個榮譽。
Parameters: 參數:
pathname - The file path to query. pathname -文件路徑查詢。
Returns: 返回:
A string representing the last file modification time in YYYYMMDDhhmmss format.一個字符串,表示最后一個文件時間修改YYYYMMDDhhmmss格式。
Throws: 拋出:
IOException - if an I/O error occurs. IOException -如果發生I / O錯誤。
Since: 因為:
2.0 2.0
setModificationTime setModificationTime
public boolean setModificationTime ( String pathname,公共布爾setModificationTime ( 字符串路徑名,
throws IOException拋出IOException異常
Issue the FTP MFMT command (not supported by all servers) which sets the last modified time of a file.問題的FTP MFMT命令(並非所有服務器都支持)中規定的最后修改文件的時間。 The timestamp should be in the form YYYYMMDDhhmmss .時間戳記應在表格YYYYMMDDhhmmss 。 It should also be in GMT, but not all servers honour this.它也應該在格林尼治標准時間,但並非所有的服務器的榮譽的。 An FTP server would indicate its support of this feature by including "MFMT" in its response to the FEAT command, which may be retrieved by FTPClient.features() FTP服務器將表明,包括在應對這一壯舉的命令,這可能是由FTPClient.features(取自“MFMT”對這一功能的支持)
Parameters: 參數:
pathname - The file path for which last modified time is to be changed. pathname -文件路徑的最后修改時間是要改變。
timeval - The timestamp to set to, in YYYYMMDDhhmmss format. timeval -時間戳設定為,在YYYYMMDDhhmmss格式。
Returns: 返回:
true if successfully set, false if not true,如果設置成功,否則為false
Throws: 拋出:
IOException - if an I/O error occurs. IOException -如果發生I / O錯誤。
Since: 因為:
2.2 2.2
See Also: 另見:
http://tools.ietf.org/html/draft-somers-ftp-mfxx-04 http://tools.ietf.org/html/draft-somers-ftp-mfxx-04
setBufferSize setBufferSize
public void setBufferSize (int bufSize)公共無效setBufferSize (智力bufSize)
Set the internal buffer size.設置內部緩沖區的大小。
Parameters: 參數:
bufSize - The size of the buffer bufSize -緩沖區的大小
getBufferSize getBufferSize
public int getBufferSize ()公共詮釋getBufferSize ()
Retrieve the current internal buffer size.檢索當前的內部緩沖區的大小。
Returns: 返回:
The current buffer size.當前緩沖區的大小。
configure配置
public void configure ( FTPClientConfig config)公共無效配置 ( FTPClientConfig配置)
Implementation of the Configurable interface.實施Configurable界面。 In the case of this class, configuring merely makes the config object available for the factory methods that construct parsers.在這個類的情況下,配置只是使配置對象的工廠方法構造解析器。
Specified by: 指定者:
configure in interface Configurable configure在接口Configurable
Parameters: 參數:
config - FTPClientConfig object used to provide non-standard configurations to the parser. config - FTPClientConfig對象,用於提供非標准配置,分析器。
Since: 因為:
1.4 1.4
setListHiddenFiles setListHiddenFiles
public void setListHiddenFiles (boolean listHiddenFiles)公共無效setListHiddenFiles (布爾listHiddenFiles)
You can set this to true if you would like to get hidden files when listFiles(java.lang.String) too.您可以設置為true,如果你想獲得隱藏的文件時listFiles(java.lang.String)了。 A LIST -a will be issued to the ftp server.一個LIST -a會發出到FTP服務器。 It depends on your ftp server if you need to call this method, also dont expect to get rid of hidden files if you call this method with "false".這取決於您的FTP服務器,如果你需要調用這個方法,也不要期望得到消除隱藏文件,如果你調用“假”這個方法。
Parameters: 參數:
listHiddenFiles - true if hidden files should be listed listHiddenFiles - True如果隱藏的文件應列出
Since: 因為:
2.0 2.0
getListHiddenFiles getListHiddenFiles
public boolean getListHiddenFiles ()公共布爾getListHiddenFiles ()
Returns: 返回:
the current state當前狀態
Since: 因為:
2.0 2.0
See Also: 另見:
isUseEPSVwithIPv4 isUseEPSVwithIPv4
public boolean isUseEPSVwithIPv4 ()公共布爾isUseEPSVwithIPv4 ()
Whether should attempt to use EPSV with IPv4.是否應該嘗試使用與IPv4 EPSV。 Default (if not set) is false默認(如果沒有設置)是false
Returns: 返回:
true if should attempt EPS如果要嘗試真正的每股收益
Since: 因為:
2.2 2.2
setUseEPSVwithIPv4 setUseEPSVwithIPv4
public void setUseEPSVwithIPv4 (boolean selected)公共無效setUseEPSVwithIPv4 (布爾選擇)
Set whether to use EPSV with IPv4.設置是否使用與IPv4 EPSV。 Might be worth enabling in some circumstances.也許值得在某些情況下啟用。 For example, when using IPv4 with NAT it may work with some rare configurations.例如,當使用IPv4和NAT它可能與某些罕見的配置。 Eg if FTP server has a static PASV address (external network) and the client is coming from another internal network.例如,如果FTP服務器有一個靜態的使用PASV地址(外部網)和客戶端是來自另一個內部網絡。 In that case the data connection after PASV command would fail, while EPSV would make the client succeed by taking just the port.在這種情況下,PASV命令后,數據連接會失敗,而EPSV將使客戶獲得成功,采取公正的端口。
Parameters: 參數:
selected - value to set. selected -要設置的值。
Since: 因為: 2.2 2.2