gpt4 book ai didi

java - Apache Commons Net FTPClient 默认使用被动模式还是主动模式?

转载 作者:行者123 更新时间:2023-11-30 05:57:13 24 4
gpt4 key购买 nike

我正在使用的应用程序使用 Apache Commons Net 中的 FTPClient 类来连接文件并将文件传输到 FTP 服务器。我试图确定默认情况下它是在被动模式还是主动模式下执行此操作,但我在应用程序代码或库本身中看不到任何引用。

有什么想法吗?

最佳答案

默认为 Activity 模式。

FTPClient constructor 的文档说:

Default FTPClient constructor. Creates a new FTPClient instance with the data connection mode set to ACTIVE_LOCAL_DATA_CONNECTION_MODE , the file type set to FTP.ASCII_FILE_TYPE , the file format set to FTP.NON_PRINT_TEXT_FORMAT , the file structure set to FTP.FILE_STRUCTURE , and the transfer mode set to FTP.STREAM_TRANSFER_MODE .

关于java - Apache Commons Net FTPClient 默认使用被动模式还是主动模式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52952749/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com