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 byte[] toBytes(String base64) {
        try {
            return Base64.decode(base64.getBytes(CHARSET), Base64.NO_WRAP);
        } catch (Exception e) {
            return null;
        }
    }
}