Java tutorial
//package com.java2s; //License from project: Open Source License import android.util.Base64; public class Main { private static final String CHARSET = "UTF-8"; public static String fromBytes(byte[] bytes) { try { return new String(Base64.encode(bytes, Base64.NO_WRAP), CHARSET); } catch (Exception e) { return null; } } }