/** * Returns the username, that was previously stored. * * @return The username set previously or null if not set */ public static String getUsername() { UsernamePasswordStore ups = UsernamePasswordStore.get(); if( ups != null ) return ups.username; else return null; }
/** * Returns the username, that was previously stored. * * @return The username set previously or null if not set */ public static String getUsername() { UsernamePasswordStore ups = UsernamePasswordStore.get(); if( ups != null ) return ups.username; else return null; }
/** * Returns the password, that was previously stored. * * @return The password set previously or null if not set */ public static char[] getPassword() { UsernamePasswordStore ups = UsernamePasswordStore.get(); if( ups != null ) { //Copy the password to another reference before returning it char[] passwordCopy = (ups.password == null) ? null : Arrays.copyOf(ups.password, ups.password.length); return passwordCopy; } else return null; }
/** * Returns the password, that was previously stored. * * @return The password set previously or null if not set */ public static char[] getPassword() { UsernamePasswordStore ups = UsernamePasswordStore.get(); if( ups != null ) { //Copy the password to another reference before returning it char[] passwordCopy = (ups.password == null) ? null : Arrays.copyOf(ups.password, ups.password.length); return passwordCopy; } else return null; }