Code example for Parcel

Methods: createStringArrayList, readInt, readLong, readParcelable, readString

0
    public static final Parcelable.Creator<VpnConfig> CREATOR = 
            new Parcelable.Creator<VpnConfig>() { 
        @Override 
        public VpnConfig createFromParcel(Parcel in) { 
            VpnConfig config = new VpnConfig(); 
            config.user = in.readString(); 
            config.interfaze = in.readString(); 
            config.session = in.readString(); 
            config.mtu = in.readInt(); 
            config.addresses = in.readString(); 
            config.routes = in.readString(); 
            config.dnsServers = in.createStringArrayList(); 
            config.searchDomains = in.createStringArrayList(); 
            config.configureIntent = in.readParcelable(null); 
            config.startTime = in.readLong(); 
            config.legacy = in.readInt() != 0; 
            return config; 
        } 
 
        @Override 
        public VpnConfig[] newArray(int size) {