Here you can find the source of base64(byte[] target)
public static String base64(byte[] target)
//package com.java2s; public class Main { public static String base64(byte[] target) { String temp = android.util.Base64.encodeToString(target, 0); return temp.replace('+', '-').replace('/', '_'); }//w ww .ja v a 2 s. c o m }