Code example for Parcel

Methods: writeInt, writeLong, writeParcelable, writeString, writeStringList

0
        return 0; 
    } 
 
    @Override 
    public void writeToParcel(Parcel out, int flags) { 
        out.writeString(user); 
        out.writeString(interfaze); 
        out.writeString(session); 
        out.writeInt(mtu); 
        out.writeString(addresses); 
        out.writeString(routes); 
        out.writeStringList(dnsServers); 
        out.writeStringList(searchDomains); 
        out.writeParcelable(configureIntent, flags); 
        out.writeLong(startTime); 
        out.writeInt(legacy ? 1 : 0); 
    } 
 
    public static final Parcelable.Creator<VpnConfig> CREATOR = 
            new Parcelable.Creator<VpnConfig>() { 
        @Override