List of usage examples for org.apache.commons.net.ftp FTPCmd PASS
FTPCmd PASS
To view the source code for org.apache.commons.net.ftp FTPCmd PASS.
Click Source Link
From source file:ch.cyberduck.core.ftp.LoggingProtocolCommandListener.java
@Override public void protocolCommandSent(final ProtocolCommandEvent event) { final String message = StringUtils.chomp(event.getMessage()); if (message.startsWith(FTPCmd.PASS.name())) { this.log(Type.request, String.format("%s %s", FTPCmd.PASS.name(), StringUtils.repeat("*", StringUtils.length(StringUtils.removeStart(message, FTPCmd.PASS.name()))))); } else {/*from w w w. j a v a2 s .co m*/ this.log(Type.request, message); } }
From source file:com.adaptris.ftp.ApacheFtpClientImpl.java
@Override public void connect(String user, String password) throws IOException { try {//w w w . j a v a 2 s . com acquireLock(); log("{} {}", FTPCmd.USER, user); log("{} ********", FTPCmd.PASS); handleReturnValue(ftpClient().login(user, password)); } finally { logReply(ftpClient().getReplyStrings()); releaseLock(); } }
From source file:com.adaptris.ftp.ApacheFtpClientImpl.java
@Override public void connect(String user, String password, String account) throws IOException { try {/*from w w w. j a v a 2s . c o m*/ acquireLock(); log("{} {}", FTPCmd.USER, user); log("{} ********", FTPCmd.PASS); log("{} {}", FTPCmd.ACCT, user); handleReturnValue(ftpClient().login(user, password, account)); } finally { logReply(ftpClient().getReplyStrings()); releaseLock(); } }
From source file:com.atomicleopard.thundr.ftp.commons.FTP.java
/** * A convenience method to send the FTP PASS command to the server, * receive the reply, and return the reply code. * @param password The plain text password of the username being logged into. * @return The reply code received from the server. * @exception FTPConnectionClosedException * If the FTP server prematurely closes the connection as a result * of the client being idle or some other reason causing the server * to send FTP reply code 421. This exception may be caught either * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while either sending the * command or receiving the server reply. *//*ww w .ja v a2 s.c o m*/ public int pass(String password) throws IOException { return sendCommand(FTPCmd.PASS, password); }