public byte[] encodePassword(String password){
  return password == null ? null : password.getBytes(Charset.forName("UTF-8"));
}

public byte [ ] encodePassword ( String password ) { return password == null ? null : password . getBytes ( Charset . forName ( "UTF-8" ) ) ; }
encodes the password to use the " correct " character encoding .
