Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
        }
    }
}