/** * Decodes array of bytes using base64 decoding and returns the result as a string. * * @param buffer Array of bytes to be decoded. * @return Resulting decoded string. */ public static String decodeAsString(final byte[] buffer) { final byte[] result = decode(buffer); try { return new String(result, "ASCII"); } catch (final UnsupportedEncodingException ex) { // should never happen return new String(result); } }
/** * Decodes array of bytes using base64 decoding and returns the result as a string. * * @param buffer Array of bytes to be decoded. * @return Resulting decoded string. */ public static String decodeAsString(final byte[] buffer) { final byte[] result = decode(buffer); try { return new String(result, "ASCII"); } catch (final UnsupportedEncodingException ex) { // should never happen return new String(result); } }
/** * Decodes array of bytes using base64 decoding and returns the result as a string. * * @param buffer Array of bytes to be decoded. * @return Resulting decoded string. */ public static String decodeAsString(final byte[] buffer) { final byte[] result = decode(buffer); try { return new String(result, "ASCII"); } catch (final UnsupportedEncodingException ex) { // should never happen return new String(result); } }
/** * Decodes array of bytes using base64 decoding and returns the result as a string. * * @param buffer Array of bytes to be decoded. * @return Resulting decoded string. */ public static String decodeAsString(final byte[] buffer) { final byte[] result = decode(buffer); try { return new String(result, "ASCII"); } catch (final UnsupportedEncodingException ex) { // should never happen return new String(result); } }
/** * Decodes array of bytes using base64 decoding and returns the result as a string. * * @param buffer Array of bytes to be decoded. * @return Resulting decoded string. */ public static String decodeAsString(final byte[] buffer) { final byte[] result = decode(buffer); try { return new String(result, "ASCII"); } catch (final UnsupportedEncodingException ex) { // should never happen return new String(result); } }
/** * Decodes array of bytes using base64 decoding and returns the result as a string. * * @param buffer Array of bytes to be decoded. * @return Resulting decoded string. */ public static String decodeAsString(final byte[] buffer) { final byte[] result = decode(buffer); try { return new String(result, "ASCII"); } catch (final UnsupportedEncodingException ex) { // should never happen return new String(result); } }
/** * Decodes array of bytes using base64 decoding and returns the result as a string. * * @param buffer Array of bytes to be decoded. * @return Resulting decoded string. */ public static String decodeAsString(final byte[] buffer) { final byte[] result = decode(buffer); try { return new String(result, "ASCII"); } catch (final UnsupportedEncodingException ex) { // should never happen return new String(result); } }
byte[] decodedBytes = Base64.decode(auth.replaceFirst("[B|b]asic ", "").getBytes()); String[] lap = new String(decodedBytes).split(":", 2); if (lap == null || lap.length != 2) {