Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.UnsupportedEncodingException;
import android.util.Base64;

public class Main {
    public static String decodeBase64(String encodedString) {

        byte[] byteData = Base64.decode(encodedString, Base64.NO_WRAP);
        String decodedString = null;
        try {
            decodedString = new String(byteData, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return decodedString;
    }
}