Bundle的parcel话,实现byte[]和Bundle数据的转化

一、思路

1.创建BundleMessage类实现Parcelable

2.实现CREATOR和describeContents(),writeToParcel()两个接口方法

3.实现marshall() 和unmarshall()数据转化的方法

4.定义内部私有变量Bundle和flags

5.完成get和put方法

6.测试

二、具体实现

package com.common.smartthank.util;

import android.os.Bundle;
import android.os.Parcel;
import android.os

猜你喜欢

转载自blog.csdn.net/yizhesong/article/details/111503727