下载完成后,若有 boolean upNewStatus = ftpClient.completePendingCommand();,到此会停住不往下执行,必须重启,否则不会往下执行
* There are a few FTPClient methods that do not complete the
* entire sequence of FTP commands to complete a transaction. 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.
public boolean completePendingCommad() throws IOException;
{
return FTPReply.isPositiveCompletion(getReply());
}
方法介绍中未说明,在何种情况下应该使用该方法。但是跟踪代码可以发现
这是一个同步阻塞方法,如果调用错误,会导致程序卡住假死在这里。
卡住代码
String line = _controlInput_.readLine()