Java XML Base64 Encode Decode toBase64String(final byte[] data)

Here you can find the source of toBase64String(final byte[] data)

Description

Converts the specified data to base64 encoded string.

License

Apache License

Parameter

Parameter Description
data data to be converted

Return

the specified data converted to base64 encoded string

Declaration

public static String toBase64String(final byte[] data) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**// w  w w. j  a  v  a 2  s .com
     * Converts the specified data to base64 encoded string.
     * 
     * @param data data to be converted
     *          
     * @return the specified data converted to base64 encoded string
     */
    public static String toBase64String(final byte[] data) {
        return javax.xml.bind.DatatypeConverter.printBase64Binary(data);
    }
}

Related

  1. sha256SaltBase64(String password, String salt)
  2. toB64(byte[] bytes)
  3. toBase10(String base64)
  4. toBase64(byte[] array)
  5. toBase64Encoded(String unencoded)
  6. toSafePathBase64(byte[] value)
  7. urlSafeBase64Decode(String in)