Java Code Examples for org.apache.commons.net.ftp.FTPReply#COMMAND_OK

The following examples show how to use org.apache.commons.net.ftp.FTPReply#COMMAND_OK . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FTPClient.java    From cyberduck with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void execPROT(final String prot) throws IOException {
    if(protocol.isSecure()) {
        if(FTPReply.COMMAND_OK != this.sendCommand("PROT", prot)) {
            throw new FTPException(this.getReplyCode(), this.getReplyString());
        }
        if("P".equals(prot)) {
            // Private
            this.setSocketFactory(sslSocketFactory);
        }
    }
}
 
Example 2
Source File: FTPClient.java    From cyberduck with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void execPBSZ(final long pbsz) throws IOException {
    if(protocol.isSecure()) {
        if(FTPReply.COMMAND_OK != this.sendCommand("PBSZ", String.valueOf(pbsz))) {
            throw new FTPException(this.getReplyCode(), this.getReplyString());
        }
    }
}
 
Example 3
Source File: FtpClient.java    From commons-vfs with Apache License 2.0 4 votes vote down vote up
default int getReplyCode() throws IOException {
    return FTPReply.COMMAND_OK;
}