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

public class Main {
    private static byte[] parcelable2Bytes(final Parcelable parcelable) {
        if (parcelable == null)
            return null;
        Parcel parcel = Parcel.obtain();
        parcelable.writeToParcel(parcel, 0);
        byte[] bytes = parcel.marshall();
        parcel.recycle();
        return bytes;
    }
}