/** * Base 64 decode as described in RFC 1421. * <p>Does not attempt to cope with extra whitespace * as described in RFC 1521. * @param s String to decode * @return String decoded byte array. */ static public String decode(String s) { try { return decode(s,StringUtil.__ISO_8859_1); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(e.toString()); } }
/** * Base 64 decode as described in RFC 1421. * <p>Does not attempt to cope with extra whitespace * as described in RFC 1521. * @param s String to decode * @return String decoded byte array. */ static public String decode(String s) { try { return decode(s,StringUtil.__ISO_8859_1); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(e.toString()); } }
/** * Base 64 decode as described in RFC 1421. * <p>Does not attempt to cope with extra whitespace * as described in RFC 1521. * @param s String to decode * @param charEncoding String representing the character encoding * used to map the decoded bytes into a String. * @return String decoded byte array. */ static public String decode(String s,String charEncoding) throws UnsupportedEncodingException { byte[] decoded=decode(s.toCharArray()); if (charEncoding==null) return new String(decoded); return new String(decoded,charEncoding); }
/** * Base 64 decode as described in RFC 1421. * <p>Does not attempt to cope with extra whitespace * as described in RFC 1521. * @param s String to decode * @param charEncoding String representing the character encoding * used to map the decoded bytes into a String. * @return String decoded byte array. */ static public String decode(String s,String charEncoding) throws UnsupportedEncodingException { byte[] decoded=decode(s.toCharArray()); if (charEncoding==null) return new String(decoded); return new String(decoded,charEncoding); }
byte[] n = B64Code.decode(nonce.toCharArray()); if (n.length!=24) return -1;
byte[] n = B64Code.decode(nonce.toCharArray()); if (n.length!=24) return -1;
String authorization = B64Code.decode( proxyAuth ); String[] authTokens = authorization.split( ":" ); String user = authTokens[0];
credentials = B64Code.decode(credentials,StringUtil.__ISO_8859_1); int i = credentials.indexOf(':'); String username = credentials.substring(0,i);
credentials = B64Code.decode(credentials,StringUtil.__ISO_8859_1); int i = credentials.indexOf(':'); String username = credentials.substring(0,i);
credentials=B64Code.decode(credentials,StringUtil.__ISO_8859_1); int i=credentials.indexOf(':'); user=credentials.substring(0,i);
credentials=B64Code.decode(credentials,StringUtil.__ISO_8859_1); int i=credentials.indexOf(':'); user=credentials.substring(0,i);