FTPClient

1.ftp二进制上传和基本命令

ASCII 模式和BINARY模式的区别是回车换行的处理,binary模式不对数据进行任何处理,asci模式将回车换行转换为本机的回车字符,比如Unix下是\n,Windows下是\r\n,Mac下是\r 

2.ftp上传的部分方法

senCommand:method inherited from FTP 发送命令给ftp,
fileType 目前只有两种,一种  FTP.ASCII_FILE_TYPE  ,一种  FTP.BINARY_FILE_TYPE
currently calling any connect method will reset the type to FTP.ASCII_FILE_TYPE

setControlEncoding ( String  encoding)  Sets the character encoding used by the FTP control connection
logout()  Logout of the FTP server by sending the QUIT command.
disconnect ()   Closes the connection to the FTP server and restores connection parameters to the default values.

storeFile(String fileName,InputStream local);    This method does NOT close the given InputStream. If the current file type is ASCII, line separators in the file are transparently converted to the NETASCII format  

retrieveFile ( String  remote, OutputStream  local)    Retrieves a named file from the server and writes it to the given OutputStream

FTPListParseEngine

The first part is comprised of reading the raw input into an internal list of strings.
The second part is composed of the actual parsing, again in conjunction with the particular parser used by this engine.

inputstream 是用来读取的 read    outputstream 是用来输出的   copyStream可以将两者互换

byteArrayInputstream 可以讲字符串变为输入流

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值