code: public void handle(Callback[] callbacks) throws IOException,
              UnsupportedCallbackException {
          for (Callback c : callbacks) {
              if (c instanceof NameCallback) {
                  ((NameCallback) c).setName(username);
              } else if (c instanceof PasswordCallback) {
                  ((PasswordCallback) c).setPassword(password.toCharArray());
              } else {
                  throw new UnsupportedCallbackException(c);
              }
          }
      }
docs: /*
  (non-Javadoc)
  @see
  javax.security.auth.callback.CallbackHandler#handle(javax.security.auth
  .callback.Callback[])