Transferring ByteArray through Parcel returns NullPointerException

后端 未结 2 1634
一向
一向 2020-12-30 01:10
import android.os.Parcel;
import android.os.Parcelable;

public class MClass implements Parcelable {
    private byte[] _byte;

    public MClass() {
    }

    publ         


        
2条回答
  •  情书的邮戳
    2020-12-30 02:11

    A shorter solution without storing the byte arrays length:

    dest.writeByteArray(byteArray);
    byteArray = in.createByteArray();
    

提交回复
热议问题