Here you can find the source of generateBase64String(String inString)
public static String generateBase64String(String inString) throws UnsupportedEncodingException
//package com.java2s; //License from project: Open Source License import android.util.Base64; import java.io.UnsupportedEncodingException; public class Main { public static String generateBase64String(String inString) throws UnsupportedEncodingException { byte[] byteTransform = inString.getBytes("UTF-8"); return Base64.encodeToString(byteTransform, Base64.NO_WRAP); }//from ww w. j a va 2 s. c o m }