Here you can find the source of base64(byte[] buff)
public static String base64(byte[] buff)
//package com.java2s; //License from project: Open Source License import java.util.Base64; public class Main { public static String base64(byte[] buff) { return new String(Base64.getEncoder().encode(buff)); //return DatatypeConverter.printBase64Binary(buff); }/*from www . jav a 2 s . c o m*/ }