@Test public void testReadWriteLongArray() throws Exception { final long[] longs = {1, 2}; parcel.writeLongArray(longs); final long[] longs2 = new long[longs.length]; parcel.readLongArray(longs2); assertTrue(Arrays.equals(longs, longs2)); }
private ChartModel(Parcel in) { super(in); yValues = new ArrayList<SerieModel>(); user = in.readParcelable(UserModel.class.getClassLoader()); in.readLongArray(xValues); in.readTypedList(yValues, SerieModel.CREATOR); id = in.readInt(); }
protected Tweet(Parcel in) { String[] data = new String[3]; in.readStringArray(data); this.body = data[0]; this.createdAt = data[1]; this.mediaUrl = data[2]; long[] longs = new long[3]; in.readLongArray(longs); this.id = longs[0]; this.numFavorites = longs[1]; this.numReTweets = longs[2]; user = (User) in.readParcelable(User.class.getClassLoader()); boolean[] bools = new boolean[2]; in.readBooleanArray(bools); this.favorited = bools[0]; this.retweeted = bools[1]; }