Code example for Parcel

Methods: dataPosition, readInt, readString, setDataPosition

0
            return new ExtensionData[size]; 
        } 
    }; 
 
    private ExtensionData(Parcel in) {
        int parcelableVersion = in.readInt();
        int parcelableSize = in.readInt();
        // Version 1 below 
        if (parcelableVersion >= 1) {
            this.mVisible = (in.readInt() != 0);
            this.mIcon = in.readInt();
            this.mStatus = in.readString();
            if (TextUtils.isEmpty(this.mStatus)) {
                this.mStatus = null;
            } 
            this.mExpandedTitle = in.readString();
            if (TextUtils.isEmpty(this.mExpandedTitle)) {
                this.mExpandedTitle = null;
            } 
            this.mExpandedBody = in.readString();
            if (TextUtils.isEmpty(this.mExpandedBody)) {
                this.mExpandedBody = null;
            } 
            try { 
                this.mClickIntent = Intent.parseUri(in.readString(), 0);
            } catch (URISyntaxException ignored) {
            } 
        } 
        // Version 2 below 
 
        // Skip any fields we don't know about. For example, if our current version's 
        // PARCELABLE_SIZE is 6 and the input parcelableSize is 12, skip the 6 fields we 
        // haven't read yet (from above) since we don't know about them. 
        in.setDataPosition(in.dataPosition() + (PARCELABLE_SIZE - parcelableSize));
    } 
 
    @Override 
    public void writeToParcel(Parcel parcel, int i) {
        /**