Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.util.Base64;

public class Main {
    static public byte[] decodeToByte(String code) {
        if (code == null || code.length() == 0) {
            return null;
        }
        return Base64.decode(code.getBytes(), Base64.NO_WRAP);
    }

    static public byte[] decodeToByte(byte[] code) {
        if (code == null || code.length == 0) {
            return null;
        }
        return Base64.decode(code, Base64.NO_WRAP);
    }
}