Java 这是我的请求
我在研究java ftp客户端的一些代码,其中一种方法使用了这个。-运算符,我不知道这是什么意思。“this.processFtpRequest”代表什么Java 这是我的请求,java,ftp-client,Java,Ftp Client,我在研究java ftp客户端的一些代码,其中一种方法使用了这个。-运算符,我不知道这是什么意思。“this.processFtpRequest”代表什么 * Initializes the FTP control connection. * @param alias the user-ID * @param binaryMode true for binary transmission, false for ASCII * @throws SecurityException i
* Initializes the FTP control connection.
* @param alias the user-ID
* @param binaryMode true for binary transmission, false for ASCII
* @throws SecurityException if the given alias or password is invalid
* @throws IOException if there is an I/O related problem
*/
private synchronized void initialize(final String alias, final String password, final boolean binaryMode) throws IOException {
FtpResponse ftpResponse = FtpResponse.parse(this.controlConnectionSource);
Logger.getGlobal().log(Level.INFO, ftpResponse.toString());
if (ftpResponse.getCode() != 220) throw new ProtocolException(ftpResponse.toString());
ftpResponse = this.processFtpRequest("USER " + (alias == null ? "guest" : alias));
if (ftpResponse.getCode() == 331) {
ftpResponse = this.processFtpRequest("PASS " + (password == null ? "" : password));
}
if (ftpResponse.getCode() != 230) throw new SecurityException(ftpResponse.toString());
ftpResponse = this.processFtpRequest("TYPE " + (binaryMode ? "I" : "A"));
if (ftpResponse.getCode() != 200) throw new ProtocolException(ftpResponse.toString());
}
发件人:
在实例方法或构造函数中,此
是对当前对象的引用,即调用其方法或构造函数的对象。您可以使用this
从实例方法或构造函数中引用当前对象的任何成员
因此,this.processFtpRequest(…)
调用当前对象。来自:
在实例方法或构造函数中,此
是对当前对象的引用,即调用其方法或构造函数的对象。您可以使用this
从实例方法或构造函数中引用当前对象的任何成员
因此,this.processFtpRequest(…)
调用当前对象