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 .