commons-ftp中ftpClient类的API(构造方法)
2014-02-20 16:48
351 查看
Constructor Summary 构造方法摘要 | |
FTPClient () Default FTPClient constructor.默认FTPClient构造。 | |
Method Summary 方法摘要 | |
protected void | _connectAction_ () Initiates control connections and gets initial reply.启动控制连接,并得到初步答复。 |
protected Socket | _openDataConnection_ (int command, String arg) Establishes a data connection with the FTP server, returning a Socket for the connection if successful.建立一个与FTP服务器的数据连接,如果返回的成功连接的Socket。 |
boolean | abort () Abort a transfer in progress.中止正在进行的传输。 |
boolean | allocate (int bytes) Reserve a number of bytes on the server for the next file transfer.保留一字节的下一个文件传输服务器数量。 |
boolean | allocate (int bytes, int recordSize) Reserve space on the server for the next file transfer.储备空间,为下一个文件传输服务器。 |
boolean | appendFile ( String remote, InputStream local) Appends to a file on the server with the given name, taking in 4000 put from the given InputStream.上的一个带有特定名称的服务器上的文件追加,即从定InputStream输入。 |
OutputStream | appendFileStream ( String remote) Returns an OutputStream through which data can be written to append to a file on the server with the given name.返回一个通过该数据可以被写入附加的带有特定名称的服务器上的文件的OutputStream。 |
boolean | changeToParentDirectory () Change to the parent directory of the current working directory.更改为当前工作目录的父目录。 |
boolean | changeWorkingDirectory ( String pathname) Change the current working directory of the FTP session.更改的FTP会话的当前工作目录。 |
boolean | completePendingCommand () There are a few FTPClient methods that do not complete the entire sequence of FTP commands to complete a transaction.有几个FTPClient方法不完成整个FTP命令序列来完成交易。 |
void | configure ( FTPClientConfig config) Implementation of the Configurable interface.实施Configurable界面。 |
boolean | deleteFile ( String pathname) Deletes a file on the FTP server.删除在FTP服务器上的文件。 |
void | disconnect () Closes the connection to the FTP server and restores connection parameters to the default values.关闭到FTP服务器,连接参数恢复到默认值的连接。 |
void | enterLocalActiveMode () Set the current data connection mode to ACTIVE_LOCAL_DATA_CONNECTION_MODE .设置当前数据连接模式ACTIVE_LOCAL_DATA_CONNECTION_MODE 。 |
void | enterLocalPassiveMode () Set the current data connection mode to PASSIVE_LOCAL_DATA_CONNECTION_MODE .设置当前数据连接模式PASSIVE_LOCAL_DATA_CONNECTION_MODE 。 |
boolean | enterRemoteActiveMode ( InetAddress host, int port) Set the current data connection mode to ACTIVE_REMOTE_DATA_CONNECTION .设置当前数据连接模式ACTIVE_REMOTE_DATA_CONNECTION 。 |
boolean | enterRemotePassiveMode () Set the current data connection mode to PASSIVE_REMOTE_DATA_CONNECTION_MODE .设置当前数据连接模式PASSIVE_REMOTE_DATA_CONNECTION_MODE 。 |
boolean | features () Query the server for supported features.查询支持的功能服务器。 |
int | getBufferSize () Retrieve the current internal buffer size.检索当前的内部缓冲区的大小。 |
int | getDataConnectionMode () Returns the current data connection mode (one of the _DATA_CONNECTION_MODE constants.返回当前的数据连接模式(一_DATA_CONNECTION_MODE常数。 |
protected String | getListArguments ( String pathname) |
boolean | getListHiddenFiles () |
String | getModificationTime ( String pathname) Issue the FTP MDTM command (not supported by all servers to retrieve the last modification time of a file.问题的FTP MDTM命令(并非所有的服务器支持,以获取一个文件的最后修改时间。 |
String | getPassiveHost () Returns the hostname or IP address (in the form of a string) returned by the server when entering passive mode.返回的主机名或IP地址(在一个字符串的形式)时,由服务器返回进入被动模式。 |
int | getPassivePort () If in passive mode, returns the data port of the passive host.如果在被动模式下,返回被动主机的数据端口。 |
long | getRestartOffset () Fetches the restart offset.撷取重新启动所抵消。 |
String | getStatus () Issue the FTP STAT command to the server. STAT命令发出的FTP服务器。 |
String | getStatus ( String pathname) Issue the FTP STAT command to the server for a given pathname. STAT命令发出的FTP的服务器为给定的路径名。 |
String | getSystemName () Deprecated. Use getSystemType() - which does not return null. 。弃用 使用getSystemType() -不返回null。 Will be deleted in version 3.0 将3.0版中删除 |
String | getSystemType () Fetches the system type from the server and returns the string.从服务器获取并返回字符串系统类型。 |
FTPListParseEngine | initiateListParsing () 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命令获取服务器目录中的原始文件信息。 |
FTPListParseEngine | initiateListParsing ( String pathname) Using the default autodetect mechanism, initialize an FTPListParseEngine object containing a raw file information for the supplied directory.使用默认的自动检测机制,初始化FTPListParseEngine对象,包含了原始文件所提供的目录信息。 |
FTPListParseEngine | initiateListParsing ( String parserKey, String pathname) Using the supplied parser key, initialize an FTPListParseEngine object containing a raw file information for the supplied directory.使用提供的解析器的关键,初始化FTPListParseEngine对象,包含了原始文件所提供的目录信息。 |
boolean | isRemoteVerificationEnabled () Return whether or not verification of the remote host participating in data connections is enabled.返回不论是否在数据连接的远程主机参加启用验证。 |
boolean | isUseEPSVwithIPv4 () Whether should attempt to use EPSV with IPv4.是否应该尝试使用与IPv4 EPSV。 |
FTPFile [] | listFiles () Using the default system autodetect mechanism, obtain a list of file information for the current working directory.使用默认的系统自动检测机制,获取当前工作目录的文件资料清单。 |
FTPFile [] | listFiles ( String pathname) Using the default system autodetect mechanism, obtain a list of file information for the current working directory or for just a single file.使用默认的系统自动检测机制,获取当前工作目录或只是一个单一的文件档案资料清单。 |
FTPFile [] | listFiles ( String pathname, FTPFileFilter filter) Version of listFiles(String) which allows a filter to be provided.从版本listFiles(String)它允许提供过滤器的人。 |
String | listHelp () Fetches the system help information from the server and returns the full string.从服务器获取系统帮助信息并返回完整的字符串。 |
String | listHelp ( String command) Fetches the help information for a given command from the server and returns the full string.为获取从服务器提供的命令的帮助信息,并返回完整的字符串。 |
String [] | listNames () Obtain a list of filenames in the current working directory This information is obtained through the NLST command.获取当前工作目录的文件名列表,这个信息是通过获得NLST命令。 |
String [] | listNames ( String pathname) Obtain a list of filenames in a directory (or just the name of a given file, which is not particularly useful).获取列表中一个目录(或者仅仅是对一个给定的文件,它是不是特别有用的名称)文件名。 |
boolean | login ( String username, String password) Login to the FTP server using the provided username and password.登录到FTP服务器使用提供的用户名和密码。 |
boolean | login ( String username, String password, String account) Login to the FTP server using the provided username, password, and account.登录到FTP服务器使用提供的用户名,密码和帐号。 |
boolean | logout () Logout of the FTP server by sending the QUIT command.注销的通过发送QUIT命令FTP服务器。 |
boolean | makeDirectory ( String pathname) 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服务器的当前目录的子目录(如果给出一个相对路径名),或在指定的(如果给出一个绝对路径名)。 |
String | printWorkingDirectory () Returns the pathname of the current working directory.返回当前工作目录的路径名。 |
boolean | remoteAppend ( String filename) Initiate a server to server file transfer.发起一个到服务器的文件传输服务器。 |
boolean | remoteRetrieve ( String filename) Initiate a server to server file transfer.发起一个到服务器的文件传输服务器。 |
boolean | remoteStore ( String filename) Initiate a server to server file transfer.发起一个到服务器的文件传输服务器。 |
boolean | remoteStoreUnique () Initiate a server to server file transfer.发起一个到服务器的文件传输服务器。 |
boolean | remoteStoreUnique ( String filename) Initiate a server to server file transfer.发起一个到服务器的文件传输服务器。 |
boolean | removeDirectory ( String pathname) Removes a directory on the FTP server (if empty).删除在FTP服务器(如果是空的)目录。 |
boolean | rename ( String from, String to) Renames a remote file.重命名远程文件。 |
boolean | retrieveFile ( String remote, OutputStream local) Retrieves a named file from the server and writes it to the given OutputStream.从服务器检索命名文件并将其写入给定的OutputStream。 |
InputStream | retrieveFileStream ( String remote) Returns an InputStream from which a named file from the server can be read.返回从其中一个指定的文件从服务器可以读取的InputStream。 |
boolean | sendNoOp () Sends a NOOP command to the FTP server.发送一个NOOP命令到FTP服务器。 |
boolean | sendSiteCommand ( String arguments) Send a site specific command.发送一个站点特定的命令。 |
void | setActiveExternalIPAddress ( String ipAddress) Set the external IP address in active mode.设置在主动模式下的外部IP地址。 |
void | setActivePortRange (int minPort, int maxPort) Set the client side port range in active mode.客户端设置在主动模式端口范围。 |
void | setBufferSize (int bufSize) Set the internal buffer size.设置内部缓冲区的大小。 |
void | setDataTimeout (int timeout) Sets the timeout in milliseconds to use when reading from the data connection.设置超时时间以毫秒为单位使用时,从数据连接读。 |
boolean | setFileStructure (int structure) Sets the file structure.设置文件的结构。 |
boolean | setFileTransferMode (int mode) Sets the transfer mode.设置传输模式。 |
boolean | setFileType (int fileType) Sets the file type to be transferred.设置文件类型转移。 |
boolean | setFileType (int fileType, int formatOrByteSize) Sets the file type to be transferred and the format.设置文件类型和格式传送。 |
void | setListHiddenFiles (boolean listHiddenFiles) You can set this to true if you would like to get hidden files whenlistFiles(java.lang.String) too.您可以设置为true,如果你想获得隐藏的文件时listFiles(java.lang.String)了。 |
boolean | setModificationTime ( String pathname, String timeval) Issue the FTP MFMT command (not supported by all servers) which sets the last modified time of a file.问题的FTP MFMT命令(并非所有服务器都支持)中规定的最后修改文件的时间。 |
void | setParserFactory ( FTPFileEntryParserFactory parserFactory) set the factory used for parser creation to the supplied factory object.为创建为所提供的解析器工厂对象所使用的工厂。 |
void | setRemoteVerificationEnabled (boolean enable) 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.启用或禁用核实,利用远程主机的数据连接部分是作为控制连接到该连接的主机是相同的。 |
void | setRestartOffset (long offset) Sets the restart offset.设置重新启动所抵消。 |
void | setUseEPSVwithIPv4 (boolean selected) Set whether to use EPSV with IPv4.设置是否使用与IPv4 EPSV。 |
boolean | storeFile ( String remote, InputStream local) Stores a file on the server using the given name and taking input from the given InputStream.存储一个使用给定的名称,并采取从给定的InputStream输入服务器的文件。 |
OutputStream | storeFileStream ( String remote) Returns an OutputStream through which data can be written to store a file on the server using the given name.返回一个通过该数据可以被写入存储在使用给定的名称服务器上的文件的OutputStream。 |
boolean | storeUniqueFile ( InputStream local) Stores a file on the server using a unique name assigned by the server and taking input from the given InputStream.使用上存储一个唯一的名称由服务器和从给定的InputStream输入到指定的服务器上的文件。 |
boolean | storeUniqueFile ( String remote, InputStream local) Stores a file on the server using a unique name derived from the given name and taking input from the given InputStream.使用上存储一个唯一的名称从给定的名称和给定的InputStream输入导出到服务器上的文件。 |
OutputStream | storeUniqueFileStream () 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。 |
OutputStream | storeUniqueFileStream ( String remote) 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。 |
boolean | structureMount ( String pathname) Issue the FTP SMNT command.问题的FTP SMNT命令。 |
相关文章推荐
- commons-net FTPClient API存取设计
- commons-ftp中ftpClient类的API
- Commons-net FTPClient completePendingCommand()经常使程序死掉的原因分析以及解决方式
- org.apache.commons.net.ftp.FTPClient上传下载压缩图片
- 转 - sun.net.ftp.FtpClient 中文API
- org.apache.commons.net.ftp.FTPClient创建中文路径
- org.apache.commons.net.ftp.FTPClient文件上传下载,中文乱码
- Jakarta Commons NET(FTPClient)的简单示例
- org.apache.commons.net.ftp.FTPClient 例子
- FTPClient与commons-pool2
- org.apache.commons.net.ftp.FTPClient使用
- Commons-net FTPClient completePendingCommand()经常使程序死掉的原因分析以及解决方式
- Commons-net FTPClient上传下载的封装
- org.apache.commons.net.ftp.FTPClient----根据文件名,路径检索文件 FTP上传 下载 删除文件
- Commons-net FTPClient上传下载的封装
- org.apache.commons.net.ftp.FTPClient
- apache.commons.net.ftp.FTPClient上传FTP
- 让Apache的commons-net-3.3中的FTPClient支持中文
- 引用 commons.net包中的FTPClient.listFiles()方法返回null的问题及其解决方案(转)
- sun.net.ftp.FtpClient 中文API