public void setUserPassword(String userName, String password) {

        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.SetUserPassword);
        byte[] secret = null;
        if(password != null && ! password.isEmpty()){
            secret = ObfuscatUtil.base64Encode(password.getBytes());
        }
        SetUserPasswordProtocol p = new SetUserPasswordProtocol(userName, secret);

        connection.submitRequest(header, p, null);

    }
public void setUserPassword ( String userName , String password ) { ProtocolHeader header = new ProtocolHeader ( ) ; header . setType ( ProtocolType . SetUserPassword ) ; byte [ ] secret = null ; if ( password != null && ! password . isEmpty ( ) ) { secret = ObfuscatUtil . base64Encode ( password . getBytes ( ) ) ; } SetUserPasswordProtocol p = new SetUserPasswordProtocol ( userName , secret ) ; connection . submitRequest ( header , p , null ) ; }
Set user password.

@param userName
the user name.
@param password
the user password.