Android examples for File Input Output:Base64
encode Base with android.util.Base64
//package com.java2s; import android.util.Base64; import java.io.UnsupportedEncodingException; public class Main { public static String encodeBase64(String str, String charset, int flags) throws UnsupportedEncodingException { return Base64.encodeToString(str.getBytes(charset), flags); }//from w w w . j a v a 2 s . c o m }