Java Utililty Methods XML Base64 Encode Decode

List of utility methods to do XML Base64 Encode Decode

Description

The list of methods to do XML Base64 Encode Decode are organized into topic(s).

Method

Stringbase64(final byte[] bytes)
base
return DatatypeConverter.printBase64Binary(bytes);
Stringbase64(final byte[] bytes)
Converts the given byte array to a base64 string.
return DatatypeConverter.printBase64Binary(bytes);
byte[]base64Decode(String base64)
base Decode
return DatatypeConverter.parseBase64Binary(base64);
byte[]base64decode(String base64Content)
basedecode
return DatatypeConverter.parseBase64Binary(base64Content);
byte[]base64Decode(String property)
base Decode
return DatatypeConverter.parseBase64Binary(property);
Stringbase64en(String string)
baseen
return DatatypeConverter.printBase64Binary(string.getBytes());
Stringbase64Encode(byte[] bytes)
base Encode
BASE64Encoder bd = new BASE64Encoder();
return bd.encode(bytes);
Stringbase64Encode(byte[] bytes)
Encodes binary data as a base64-encoded string.
if (bytes == null)
    return null;
return javax.xml.bind.DatatypeConverter.printBase64Binary(bytes);
Stringbase64Encode(byte[] bytes)
base Encode
return javax.xml.bind.DatatypeConverter.printBase64Binary(bytes);
Stringbase64encode(byte[] bytes, boolean pad)
baseencode
StringBuilder sb = new StringBuilder();
sb.append(javax.xml.bind.DatatypeConverter.printBase64Binary(bytes));
while (!pad && sb.charAt(sb.length() - 1) == '=') {
    sb.deleteCharAt(sb.length() - 1);
return sb.toString();