List of usage examples for android.os Parcel readByte
public final byte readByte()
From source file:Main.java
public static Boolean readBooleanFromParcel(Parcel in) { return (in.readByte() != 0) ? (in.readByte() != 0) : null; }
From source file:Main.java
public static Integer readIntegerFromParcel(Parcel in) { return (in.readByte() != 0) ? in.readInt() : null; }
From source file:Main.java
public static Double readDoubleFromParcel(Parcel in) { return (in.readByte() != 0) ? in.readDouble() : null; }
From source file:Main.java
public static boolean readBool(Parcel in) { return in.readByte() == TRUE_VALUE; }
From source file:Main.java
public static List<Integer> readIntegerListFromParcel(Parcel in) { boolean hasValue = (in.readByte() != 0); if (hasValue) { List<Integer> list = new ArrayList<>(); int N = in.readInt(); for (int i = 0; i < N; i++) { list.add(in.readInt());/*from www . j av a 2 s . c om*/ } return list; } return null; }
From source file:com.baasbox.android.BaasLink.java
private static BaasObject readObject(Parcel parcel) { byte b = parcel.readByte(); if (b == 0)//from w w w .jav a2s . c om return null; if (b == 1) { BaasDocument d = parcel.readParcelable(BaasDocument.class.getClassLoader()); return d; } else if (b == 2) { BaasFile f = parcel.readParcelable(BaasFile.class.getClassLoader()); return f; } return null; }
From source file:ch.berta.fabio.popularmovies.presentation.viewmodels.MovieDetailsViewModelFavImpl.java
protected MovieDetailsViewModelFavImpl(Parcel in) { super(in); mRefreshing = in.readByte() != 0; }
From source file:com.frodo.github.bean.dto.request.RepoRequestDTO.java
protected RepoRequestDTO(Parcel in) { this.name = in.readString(); this.description = in.readString(); this.homepage = in.readString(); this.isPrivate = in.readByte() != 0; this.has_issues = in.readByte() != 0; this.has_wiki = in.readByte() != 0; this.has_downloads = in.readByte() != 0; this.default_branch = in.readString(); this.auto_init = in.readByte() != 0; this.gitignore_template = in.readString(); this.license_template = in.readString(); this.team_id = in.readInt(); }
From source file:com.nextgis.maplib.datasource.ngw.Resource.java
protected Resource(Parcel in) { mName = in.readString();//from www . ja v a 2 s .c o m mHasChildren = in.readByte() == 1; mDescription = in.readString(); mKeyName = in.readString(); mOwnerId = in.readLong(); boolean hasPermissions = in.readByte() == 1; if (hasPermissions) { try { mPermissions = new JSONObject(in.readString()); } catch (JSONException e) { e.printStackTrace(); } } mType = in.readInt(); mId = in.readInt(); }
From source file:com.nextgis.maplib.datasource.ngw.ResourceGroup.java
protected ResourceGroup(Parcel in) { super(in);/*from w ww .j a v a 2 s.co m*/ mChildrenLoaded = in.readByte() == 1; int count = in.readInt(); mChildren = new ArrayList<>(); for (int i = 0; i < count; i++) { int type = in.readInt(); switch (type) { case Connection.NGWResourceTypeResourceGroup: ResourceGroup resourceGroup = in.readParcelable(ResourceGroup.class.getClassLoader()); resourceGroup.setParent(this); mChildren.add(resourceGroup); break; case Connection.NGWResourceTypePostgisLayer: case Connection.NGWResourceTypeRasterLayer: case Connection.NGWResourceTypeVectorLayer: LayerWithStyles layer = in.readParcelable(LayerWithStyles.class.getClassLoader()); layer.setParent(this); mChildren.add(layer); break; } } }