content Values From Byte Array - Android android.content

Android examples for android.content:ContentValues

Description

content Values From Byte Array

Demo Code


//package com.java2s;
import android.content.ContentValues;

import android.os.Parcel;

public class Main {
    public static ContentValues contentValuesFromByteArray(byte[] byteArray) {
        Parcel obtain = Parcel.obtain();
        obtain.unmarshall(byteArray, 0, byteArray.length);
        obtain.setDataPosition(0);/* ww  w . j  a v  a2 s.co m*/
        ContentValues createFromParcel = ContentValues.CREATOR
                .createFromParcel(obtain);
        obtain.recycle();
        return createFromParcel;
    }
}

Related Tutorials