Example usage for android.os Parcel readByte

List of usage examples for android.os Parcel readByte

Introduction

In this page you can find the example usage for android.os Parcel readByte.

Prototype

public final byte readByte() 

Source Link

Document

Read a byte value from the parcel at the current dataPosition().

Usage

From source file:com.vk.sdk.api.model.VKApiPost.java

/**
 * Creates a Post instance from Parcel./*  w  ww.  j a va  2 s .c om*/
 */
public VKApiPost(Parcel in) {
    this.id = in.readInt();
    this.to_id = in.readInt();
    this.from_id = in.readInt();
    this.date = in.readLong();
    this.text = in.readString();
    this.reply_owner_id = in.readInt();
    this.reply_post_id = in.readInt();
    this.friends_only = in.readByte() != 0;
    this.comments_count = in.readInt();
    this.can_post_comment = in.readByte() != 0;
    this.likes_count = in.readInt();
    this.user_likes = in.readByte() != 0;
    this.can_like = in.readByte() != 0;
    this.can_publish = in.readByte() != 0;
    this.reposts_count = in.readInt();
    this.user_reposted = in.readByte() != 0;
    this.post_type = in.readString();
    this.attachments = in.readParcelable(VKAttachments.class.getClassLoader());
    this.geo = in.readParcelable(VKApiPlace.class.getClassLoader());
    this.signer_id = in.readInt();
}

From source file:id.satusatudua.sigap.data.model.ImportantContact.java

protected ImportantContact(Parcel in) {
    contactId = in.readString();//from ww  w .  ja  v a 2 s .  com
    name = in.readString();
    phoneNumber = in.readString();
    userId = in.readString();
    address = in.readString();
    createdAt = new Date(in.readLong());
    avgRate = in.readDouble();
    totalRate = in.readDouble();
    totalUserRate = in.readLong();
    myRate = in.readInt();
    bookmarked = in.readByte() != 0;
    user = in.readParcelable(User.class.getClassLoader());
}

From source file:com.cas.model.SiteInfo.java

private SiteInfo(Parcel in) {
    this.sitename = in.readString();
    this.username = in.readString();
    this.firstname = in.readString();
    this.lastname = in.readString();
    this.fullname = in.readString();
    this.userid = in.readInt();
    this.siteurl = in.readString();
    this.userpictureurl = in.readString();
    this.downloadfiles = in.readByte() == 1;

    int count = in.readInt();
    for (int i = 0; i < count; i++) {
        this.addFunction(in.readString(), in.readString());
    }/*from   w  ww.jav  a2s.  c  o m*/

}

From source file:it_minds.dk.eindberetningmobil_android.models.DrivingReport.java

protected DrivingReport(Parcel in) {
    this.Uuid = in.readString();
    this.purpose = in.readString();
    this.orgLocation = in.readString();
    this.Rate = in.readString();
    this.extraDescription = in.readString();
    this.haveEditedDistance = in.readByte() != 0;
    this.startedAtHome = in.readByte() != 0;
    this.endedAtHome = in.readByte() != 0;
    this.fourKMRule = in.readByte() != 0;
    this.startTime = (DateTime) in.readSerializable();
    this.endTime = (DateTime) in.readSerializable();
    this.distanceInMeters = in.readDouble();
    this.gpsPoints = in.createTypedArrayList(GPSCoordinateModel.CREATOR);
    this.homeToBorderDistance = in.readDouble();
}

From source file:com.paymaya.sdk.android.checkout.models.Checkout.java

public Checkout(Parcel in) {
    totalAmount = in.readParcelable(TotalAmount.class.getClassLoader());
    buyer = in.readParcelable(Buyer.class.getClassLoader());

    itemList = new ArrayList<>();
    in.readTypedList(itemList, Item.CREATOR);

    redirectUrl = in.readParcelable(RedirectUrl.class.getClassLoader());
    requestReferenceNumber = in.readString();
    isAutoRedirect = in.readByte() != 0;

    try {//  www  . j a  v  a 2s .  c  o  m
        String json = in.readString();
        if (!TextUtils.isEmpty(json)) {
            metadata = new JSONObject(json);
        }
    } catch (JSONException ignored) {
    }
}

From source file:com.dwg.weibo.entity.Status.java

protected Status(Parcel in) {
    this.created_at = in.readString();
    this.id = in.readString();
    this.mid = in.readString();
    this.idstr = in.readString();
    this.textLength = in.readInt();
    this.text = in.readString();
    this.isLongText = in.readByte() != 0;
    this.source_type = in.readInt();
    this.source = in.readString();
    this.favorited = in.readByte() != 0;
    this.truncated = in.readByte() != 0;
    this.in_reply_to_status_id = in.readString();
    this.in_reply_to_user_id = in.readString();
    this.in_reply_to_screen_name = in.readString();
    this.thumbnail_pic = in.readString();
    this.bmiddle_pic = in.readString();
    this.original_pic = in.readString();
    this.geo = in.readParcelable(Geo.class.getClassLoader());
    this.user = in.readParcelable(User.class.getClassLoader());
    this.retweeted_status = in.readParcelable(Status.class.getClassLoader());
    this.reposts_count = in.readInt();
    this.comments_count = in.readInt();
    this.attitudes_count = in.readInt();
    this.mlevel = in.readInt();
    this.visible = in.readParcelable(Visible.class.getClassLoader());
    this.source_allowclick = in.readInt();
    this.pic_urls = new ArrayList<PicUrlsBean>();
    in.readList(this.pic_urls, PicUrlsBean.class.getClassLoader());
    this.thumbnail_pic_urls = in.createStringArrayList();
    this.bmiddle_pic_urls = in.createStringArrayList();
    this.origin_pic_urls = in.createStringArrayList();
    this.singleImgSizeType = in.readString();
}

From source file:com.vk.sdk.api.model.VKApiDocument.java

/**
 * Creates a Doc instance from Parcel.// ww  w  . ja  v  a  2s.c o m
 */
public VKApiDocument(Parcel in) {
    this.id = in.readInt();
    this.owner_id = in.readInt();
    this.title = in.readString();
    this.size = in.readLong();
    this.ext = in.readString();
    this.url = in.readString();
    this.photo_100 = in.readString();
    this.photo_130 = in.readString();
    this.photo = in.readParcelable(VKPhotoSizes.class.getClassLoader());
    this.access_key = in.readString();
    this.mIsImage = in.readByte() != 0;
    this.mIsGif = in.readByte() != 0;
}

From source file:net.exclaimindustries.geohashdroid.util.KnownLocation.java

public void readFromParcel(Parcel in) {
    // Same way it went out.
    mName = in.readString();//from w w  w  .  ja va  2s .  com
    mLocation = in.readParcelable(KnownLocation.class.getClassLoader());
    mRange = in.readDouble();
    mRestrictGraticule = in.readByte() != 0;
}

From source file:org.droid2droid.internal.AbstractRemoteAndroidImpl.java

@Override
public boolean pingBinder(int connid, int oid, long timeout) throws RemoteException {
    if (D)/* w ww  .  j  av  a  2 s .  co  m*/
        Log.d(TAG_CLIENT_BIND, PREFIX_LOG + "pingBinder...");
    if (!isBinderAlive())
        return false;
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    try {
        data.writeInt(oid);
        transactRemoteAndroid(getConnectionId(), PING_BINDER, data, reply, 0, timeout);
        return reply.readByte() == 1;
    } finally {
        if (data != null)
            data.recycle();
        if (reply != null)
            reply.recycle();
    }
}

From source file:org.droid2droid.internal.AbstractRemoteAndroidImpl.java

@Override
public boolean isBinderAlive(int connid, int oid, long timeout) throws RemoteException {
    if (D)/*w  w  w .j  ava  2  s  . co  m*/
        Log.d(TAG_CLIENT_BIND, PREFIX_LOG + "isBinderAlive...");
    if (!isBinderAlive()) {
        if (E)
            Log.e(TAG_CLIENT_BIND, PREFIX_LOG + "Binder is not alive");
        throw new RemoteException();
    }
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    try {
        data.writeInt(oid);
        transactRemoteAndroid(getConnectionId(), IS_BINDER_ALIVE, data, reply, 0, timeout);
        return reply.readByte() == 1;
    } finally {
        if (data != null)
            data.recycle();
        if (reply != null)
            reply.recycle();
    }
}