Here you can find the source of base64Encode(byte[] bytes)
private static String base64Encode(byte[] bytes)
//package com.java2s; import android.util.Base64; public class Main { private static String base64Encode(byte[] bytes) { // NB: This class is internal, and you probably should use another impl return Base64.encodeToString(bytes, Base64.DEFAULT); }//from w ww .j av a2s . co m }