List of utility methods to do Base64 Encode
String | base64Encode(String plainTextString) Encodes a string using Base64 encoding. String encoded = new String(Base64.getEncoder().encode(plainTextString.getBytes())); return encoded; |
String | base64Encode(String s) base Encode if (s == null) return null; try { return (new sun.misc.BASE64Encoder()).encode(s.getBytes(DEFAULT_CHARSET)); } catch (UnsupportedEncodingException e) { return null; |
String | base64encode(String s) baseencode return base64encode(s.getBytes());
|
String | base64Encode(String s) base Encode return encode(s.getBytes(), 0);
|
String | base64Encode(String s) base Encode StringBuilder sb = new StringBuilder(); StringReader r = new StringReader(s); int c = 0; int d = 0; int e = 0; int k = 0; int end = 0; byte u; ... |
String | base64encode(String str) baseencode byte[] utf8; try { utf8 = str.getBytes("UTF-8"); } catch (UnsupportedEncodingException ex) { throw new InternalError(ex.toString()); StringBuffer sb = new StringBuffer((utf8.length + 2) / 3 * 4); int i; ... |
String | base64Encode(String string) base Encode StringBuffer encoded = new StringBuffer(); byte utf8[] = stringToUTF8(string); int i = 0; while (i < utf8.length) { byte input1 = utf8[i++]; byte input2 = i < utf8.length ? utf8[i++] : 0; byte input3 = i < utf8.length ? utf8[i++] : 0; int output1 = input1 >> 2; ... |
String | base64Encode(String string) base Encode String encodedString = ""; byte bytes[] = string.getBytes(); int i = 0; int pad = 0; while (i < bytes.length) { byte b1 = bytes[i++]; byte b2; byte b3; ... |
String | base64encode(String text) base64encode try { return enc.encode(text.getBytes(DEFAULT_ENCODING)); } catch (UnsupportedEncodingException e) { return null; |
String | base64EncodeGeneric(String digits, byte[] data) base Encode Generic if (data == null) throw new IllegalArgumentException("'data' can't be null"); if (digits == null) throw new IllegalArgumentException("'digits' can't be null"); if (digits.length() != 64) throw new IllegalArgumentException("'digits' must be 64 characters long: " + jq(digits)); int numGroupsOfThreeInputBytes = (data.length + 2) / 3; int numOutputChars = numGroupsOfThreeInputBytes * 4; ... |