Java tutorial
//package com.java2s; //License from project: Apache License import android.content.ContentValues; import android.os.Parcel; public class Main { public static byte[] arrayToByteArray(ContentValues[] contentValues) { Parcel obtain = Parcel.obtain(); obtain.writeParcelableArray(contentValues, 0); byte[] byteArray = obtain.marshall(); obtain.recycle(); return byteArray; } }