/** * Translates the specified Base64 string (as per Preferences.get(byte[])) * into a byte array. * * @throw IllegalArgumentException if <tt>s</tt> is not a valid Base64 * string. */ static byte[] base64ToByteArray(String s) { return base64ToByteArray(s, false); }
/** * Translates the specified "aternate representation" Base64 string * into a byte array. * * @throw IllegalArgumentException or ArrayOutOfBoundsException * if <tt>s</tt> is not a valid alternate representation * Base64 string. */ static byte[] altBase64ToByteArray(String s) { return base64ToByteArray(s, true); }
return new Authenticator.Failure (401); byte[] b = Base64.base64ToByteArray (auth.substring(sp+1)); String userpass = new String (b); int colon = userpass.indexOf (':');