try {
callbackHandler.handle(new Callback[]{usernameCallback, passwordCallback});
} catch (UnsupportedCallbackException ex) {
LoginException le = new LoginException("callback is not supported");
le.initCause(ex);
throw le;
} catch (IOException ex) {
LoginException le = new LoginException("io error in callback handler");
le.initCause(ex);
throw le;