A FTP server library

2019-06-09 10:34发布

问题:

My question may sound stupid to anyone who has any knowledge about protocols and networking.

I'm looking for a java library that allows to run a FTP server, compatible with Android. I tried Apache FTPServer, but I keep getting errors from Dalvik, or the library itself...

Searching on google doesn't give any interesting results, and since I never touched FTP programming before, I don't really know where to begin.

Thanks in advance for your support.

回答1:

I think you can use : JFtp, but you can use too InputStream and OutputStream, BufferedStream to make a ftp client



回答2:

Do not use Apache Mina FtpServer.

Check the following issue, you cannot stop a transfer in the middle. So terrible! I have spent 1 week with it in a project and suddenly found this restriction. It is not acceptable when transferring big files which user may choose to interrupt.

https://issues.apache.org/jira/browse/FTPSERVER-400

Also check the comment in ABOR impl.

  • ABOR <CRLF>
    • This command tells the server to abort the previous FTP service command and
  • any associated transfer of data. No action is to be taken if the previous
  • command has been completed (including data transfer). The control connection
  • is not to be closed by the server, but the data connection must be closed.
  • Current implementation does not do anything. As here data transfers are not
  • multi-threaded.


回答3:

Maybe Apache Mina would work?



标签: android ftp