public void setDataChannelAuthentication(DataChannelAuthentication type)
        throws IOException,
               ServerException {

        Command cmd = new Command("DCAU", type.toFtpCmdArgument());
        try{

            controlChannel.execute(cmd);

        } catch (UnexpectedReplyCodeException urce) {
            if(!type.toFtpCmdArgument().equals("N"))
            {
                throw ServerException.embedUnexpectedReplyCodeException(urce);
            }
        } catch(FTPReplyParseException rpe) {
            throw ServerException.embedFTPReplyParseException(rpe);
        }

        this.gSession.dataChannelAuthentication = type;

        gLocalServer.setDataChannelAuthentication(type);
    }
public void setDataChannelAuthentication ( DataChannelAuthentication type ) throws IOException , ServerException { Command cmd = new Command ( "DCAU" , type . toFtpCmdArgument ( ) ) ; try { controlChannel . execute ( cmd ) ; } catch ( UnexpectedReplyCodeException urce ) { if ( ! type . toFtpCmdArgument ( ) . equals ( "N" ) ) { throw ServerException . embedUnexpectedReplyCodeException ( urce ) ; } } catch ( FTPReplyParseException rpe ) { throw ServerException . embedFTPReplyParseException ( rpe ) ; } this . gSession . dataChannelAuthentication = type ; gLocalServer . setDataChannelAuthentication ( type ) ; }
Sets data channel authentication mode (DCAU)

@param type for 2-party transfer must be
DataChannelAuthentication.SELF or DataChannelAuthentication.NONE