Problem with FTPClient class in java

后端 未结 2 609
再見小時候
再見小時候 2021-01-12 04:44

I\'m using org.apache.commons.net.ftp.FTPClient and seeing behavior that is, well... perplexing.

The method beneath intends to go through an FTPFile list, read them

2条回答
  •  温柔的废话
    2021-01-12 04:49

    It works ok when I add after the "retrieve" command :

            int response = client.getReply();
            if (response != FTPReply.CLOSING_DATA_CONNECTION){
                //TODO 
            }
    

提交回复
热议问题