Java XML Base64 Encode Decode base64(final byte[] bytes)

Here you can find the source of base64(final byte[] bytes)

Description

base

License

Open Source License

Declaration

public static String base64(final byte[] bytes) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.xml.bind.DatatypeConverter;

public class Main {
    public static String base64(final byte[] bytes) {
        return DatatypeConverter.printBase64Binary(bytes);
    }/*w ww.ja v a2s  .  c om*/

    public static byte[] base64(final String str) {
        return DatatypeConverter.parseBase64Binary(str);
    }
}

Related

  1. base64(final byte[] bytes)
  2. base64Decode(String base64)
  3. base64decode(String base64Content)
  4. base64Decode(String property)