Java tutorial
//package com.java2s; import android.os.Parcel; import java.util.ArrayList; import java.util.List; public class Main { public static List<Integer> readIntegerListFromParcel(Parcel in) { boolean hasValue = (in.readByte() != 0); if (hasValue) { List<Integer> list = new ArrayList<>(); int N = in.readInt(); for (int i = 0; i < N; i++) { list.add(in.readInt()); } return list; } return null; } }