Here you can find the source of encodeBase64(String value)
public static String encodeBase64(String value)
//package com.java2s; import android.util.Base64; public class Main { public static String encodeBase64(String value) { if (!isEmpty(value)) { return Base64.encodeToString(value.getBytes(), Base64.DEFAULT); }/*from www .java 2 s . c om*/ return ""; } public static boolean isEmpty(String value) { return value == null || value.trim().equals("") || value.length() == 0; } }