((NameCallback) callbacks[i]).setName(userName);
} else if (callbacks[i] instanceof PasswordCallback) {
((PasswordCallback) callbacks[i]).setPassword(password
.toCharArray());
} else {
throw new UnsupportedCallbackException(callbacks[i],
"Callback class not supported");
}
}
}