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.os.Bundle;
import android.os.Parcel;

public class Main {
    public static Bundle bundleFromByteArray(byte[] byteArray) {
        Parcel obtain = Parcel.obtain();
        obtain.unmarshall(byteArray, 0, byteArray.length);
        obtain.setDataPosition(0);
        Bundle result = Bundle.CREATOR.createFromParcel(obtain);
        obtain.recycle();
        return result;
    }
}