Example usage for android.os Parcel readLong

List of usage examples for android.os Parcel readLong

Introduction

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

Prototype

public final long readLong() 

Source Link

Document

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

Usage

From source file:at.diamonddogs.data.adapter.parcelable.ParcelableAdapterWebRequest.java

/**
 * Required by Parcelable mechanism/* w w  w.j ava  2s  . c  o m*/
 * 
 * @param in
 *            the input parcel
 */
public ParcelableAdapterWebRequest(Parcel in) {
    super(in);
    if (dataObject == null) {
        dataObject = new WebRequest();
    }
    dataObject.setProcessorId(in.readInt());
    dataObject.setRequestType((Type) in.readSerializable());
    dataObject.setUrl((URL) in.readSerializable());
    dataObject.setReadTimeout(in.readInt());
    dataObject.setConnectionTimeout(in.readInt());
    dataObject.setFollowRedirects(in.readInt() == 1);

    boolean first = (in.readInt() == 1);
    if (first) {
        ParcelableAdapterTempFile tmp = in.readParcelable(ClassLoader.getSystemClassLoader());
        dataObject.setTmpFile(new Pair<Boolean, TempFile>(first, tmp.getDataObject()));
    }

    dataObject.setHeader(readStringMap(in));
    dataObject.setCacheTime(in.readLong());
    dataObject.setNumberOfRetries(in.readInt());
    dataObject.setRetryInterval(in.readInt());

    dataObject.setCancelled(in.readInt() == 1);
    dataObject.setCheckConnectivity(in.readInt() == 1);
    dataObject.setCheckConnectivityPing(in.readInt() == 1);
    dataObject.setUseOfflineCache(in.readInt() == 1);

}

From source file:com.nestlabs.sdk.Thermostat.java

private Thermostat(Parcel in) {
    super(in);/*from w  w w.  j av a  2  s .c o m*/
    mCanCool = readBoolean(in);
    mCanHeat = readBoolean(in);
    mIsUsingEmergencyHeat = readBoolean(in);
    mHasFan = readBoolean(in);
    mFanTimerActive = readBoolean(in);
    mFanTimerTimeout = in.readString();
    mHasLeaf = readBoolean(in);
    mTemperatureScale = in.readString();
    mTargetTemperatureF = in.readLong();
    mTargetTemperatureC = in.readDouble();
    mTargetTemperatureHighF = in.readLong();
    mTargetTemperatureHighC = in.readDouble();
    mTargetTemperatureLowF = in.readLong();
    mTargetTemperatureLowC = in.readDouble();
    mAwayTemperatureHighF = in.readLong();
    mAwayTemperatureHighC = in.readDouble();
    mAwayTemperatureLowF = in.readLong();
    mAwayTemperatureLowC = in.readDouble();
    mHvacMode = in.readString();
    mAmbientTemperatureF = in.readLong();
    mAmbientTemperatureC = in.readDouble();
    mHumidity = in.readLong();
    mHvacState = in.readString();
    mIsLocked = readBoolean(in);
    mLockedTempMinF = in.readString();
    mLockedTempMaxF = in.readString();
    mLockedTempMinC = in.readString();
    mLockedTempMaxC = in.readString();
    mLabel = in.readString();
}

From source file:com.eTilbudsavis.etasdk.model.Catalog.java

private Catalog(Parcel in) {
    this.mErn = in.readString();
    this.mLabel = in.readString();
    this.mBackground = (Integer) in.readValue(Integer.class.getClassLoader());
    long tmpMRunFrom = in.readLong();
    this.mRunFrom = tmpMRunFrom == -1 ? null : new Date(tmpMRunFrom);
    long tmpMRunTill = in.readLong();
    this.mRunTill = tmpMRunTill == -1 ? null : new Date(tmpMRunTill);
    this.mPageCount = in.readInt();
    this.mOfferCount = in.readInt();
    this.mBranding = in.readParcelable(Branding.class.getClassLoader());
    this.mDealerId = in.readString();
    this.mDealerUrl = in.readString();
    this.mStoreId = in.readString();
    this.mStoreUrl = in.readString();
    this.mDimension = in.readParcelable(Dimension.class.getClassLoader());
    this.mImages = in.readParcelable(Images.class.getClassLoader());
    this.mCatrgoryIds = (HashSet<String>) in.readSerializable();
    this.mPdfUrl = in.readString();
    this.mPages = new ArrayList<Images>();
    in.readTypedList(mPages, Images.CREATOR);
    this.mDealer = in.readParcelable(Dealer.class.getClassLoader());
    this.mStore = in.readParcelable(Store.class.getClassLoader());
    this.mHotspots = in.readParcelable(HotspotMap.class.getClassLoader());
}

From source file:com.wellsandwhistles.android.redditsp.reddit.things.RedditComment.java

private RedditComment(final Parcel in) {

    body = in.readString();/*from   w ww.  j a va2s  .  c  o  m*/
    body_html = in.readString();
    author = in.readString();
    subreddit = in.readString();
    author_flair_text = in.readString();

    archived = in.readInt() == 1;
    switch (in.readInt()) {
    case -1:
        likes = false;
        break;
    case 0:
        likes = null;
        break;
    case 1:
        likes = true;
        break;
    }

    replies = null;

    id = in.readString();
    subreddit_id = in.readString();
    link_id = in.readString();
    parent_id = in.readString();
    name = in.readString();
    context = in.readString();

    ups = in.readInt();
    downs = in.readInt();

    final long in_edited = in.readLong();
    if (in_edited == -1) {
        edited = false;
    } else {
        edited = in_edited;
    }

    created = in.readLong();
    created_utc = in.readLong();

    saved = in.readInt() != 0;
    gilded = in.readInt();

    distinguished = in.readString();
}

From source file:com.android.emailcommon.provider.Account.java

/**
 * Supports Parcelable/* www.  j  a va  2s .com*/
 */
public Account(Parcel in) {
    mBaseUri = Account.CONTENT_URI;
    mId = in.readLong();
    mDisplayName = in.readString();
    mEmailAddress = in.readString();
    mSyncKey = in.readString();
    mSyncLookback = in.readInt();
    mSyncInterval = in.readInt();
    mHostAuthKeyRecv = in.readLong();
    mHostAuthKeySend = in.readLong();
    mFlags = in.readInt();
    /* mCompatibilityUuid = */ in.readString();
    mSenderName = in.readString();
    mRingtoneUri = in.readString();
    mProtocolVersion = in.readString();
    /* mNewMessageCount = */ in.readInt();
    mSecuritySyncKey = in.readString();
    mSignature = in.readString();
    mPolicyKey = in.readLong();

    mHostAuthRecv = null;
    if (in.readByte() == 1) {
        mHostAuthRecv = new HostAuth(in);
    }

    mHostAuthSend = null;
    if (in.readByte() == 1) {
        mHostAuthSend = new HostAuth(in);
    }
}

From source file:com.eTilbudsavis.etasdk.model.ShoppinglistItem.java

private ShoppinglistItem(Parcel in) {
    this.mId = in.readString();
    this.mErn = in.readString();
    this.mTick = in.readByte() != 0;
    this.mOfferId = in.readString();
    this.mCount = in.readInt();
    this.mDescription = in.readString();
    this.mCreator = in.readString();
    long tmpMModified = in.readLong();
    this.mModified = tmpMModified == -1 ? null : new Date(tmpMModified);
    this.mOffer = in.readParcelable(Offer.class.getClassLoader());
    this.mShoppinglistId = in.readString();
    this.mPrevId = in.readString();
    this.mMeta = in.readString();
    this.mUserId = in.readInt();
    this.mSyncState = in.readInt();
}

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

public VKApiCommunityFull(Parcel in) {
    super(in);// w  w w  .  j a v a  2  s  .  c o  m
    this.city = in.readParcelable(VKApiCity.class.getClassLoader());
    this.country = in.readParcelable(VKApiCountry.class.getClassLoader());
    this.status_audio = in.readParcelable(VKApiAudio.class.getClassLoader());
    this.place = in.readParcelable(VKApiPlace.class.getClassLoader());
    this.description = in.readString();
    this.wiki_page = in.readString();
    this.members_count = in.readInt();
    this.counters = in.readParcelable(Counters.class.getClassLoader());
    this.start_date = in.readLong();
    this.end_date = in.readLong();
    this.can_post = in.readByte() != 0;
    this.can_see_all_posts = in.readByte() != 0;
    this.status = in.readString();
    this.contacts = in.readParcelable(VKList.class.getClassLoader());
    this.links = in.readParcelable(VKList.class.getClassLoader());
    this.fixed_post = in.readInt();
    this.verified = in.readByte() != 0;
    this.site = in.readString();
    this.blacklisted = in.readByte() != 0;
}

From source file:de.azapps.mirakel.model.list.ListMirakel.java

private ListMirakel(Parcel in) {
    final int tmpSortBy = in.readInt();
    this.sortBy = SORT_BY.values()[tmpSortBy];
    this.createdAt = in.readString();
    this.updatedAt = in.readString();
    final int tmpSyncState = in.readInt();
    this.syncState = SYNC_STATE.values()[tmpSyncState];
    this.lft = in.readInt();
    this.rgt = in.readInt();
    this.color = in.readInt();
    this.accountID = in.readLong();
    this.isSpecial = in.readByte() != 0;
    this.setId(in.readLong());
    this.setName(in.readString());
}

From source file:com.bravo.ecm.service.ScannedFile.java

public void readFromParcel(Parcel parcel) {
    pathname = parcel.readString();/*from w w w . j  a  v a  2s. c  o  m*/
    ean = parcel.readString();
    parcel.readStringList(titles);
    publisher = parcel.readString();

    try {
        long date = parcel.readLong();
        publishedDate = new Date(date);
    } catch (Exception ex) {
        publishedDate = null;
    }

    int size = parcel.readInt();
    for (int i = 0; i < size; i++) {
        String first = parcel.readString();
        String last = parcel.readString();
        addContributor(first, last);
    }

    try {
        parcel.readLong();
        lastAccessedDate = new Date((new File(pathname)).lastModified());
    } catch (Exception ex) {
        lastAccessedDate = null;
    }
    try {
        long date = parcel.readLong();
        createdDate = new Date(date);
    } catch (Exception ex) {
        createdDate = null;
    }
    int idx = pathname.lastIndexOf('.');
    String ext = pathname.substring(idx + 1).toLowerCase();
    if (ext.equals("html")) {
        ext = "htm";
    }
    if (type.equals("zip"))
        type = "fb2";
    type = ext;
    addKeywords(ext);
}

From source file:com.vk.sdkweb.api.model.VKApiUserFull.java

public VKApiUserFull(Parcel in) {
    super(in);/*from ww  w.ja v  a 2s . com*/
    this.activity = in.readString();
    this.status_audio = in.readParcelable(VKApiAudio.class.getClassLoader());
    this.bdate = in.readString();
    this.city = in.readParcelable(VKApiCity.class.getClassLoader());
    this.country = in.readParcelable(VKApiCountry.class.getClassLoader());
    this.last_seen = in.readLong();
    this.universities = in.readParcelable(VKList.class.getClassLoader());
    this.schools = in.readParcelable(VKList.class.getClassLoader());
    this.smoking = in.readInt();
    this.alcohol = in.readInt();
    this.political = in.readInt();
    this.life_main = in.readInt();
    this.people_main = in.readInt();
    this.inspired_by = in.readString();
    this.langs = in.createStringArray();
    this.religion = in.readString();
    this.facebook = in.readString();
    this.facebook_name = in.readString();
    this.livejournal = in.readString();
    this.skype = in.readString();
    this.site = in.readString();
    this.twitter = in.readString();
    this.instagram = in.readString();
    this.mobile_phone = in.readString();
    this.home_phone = in.readString();
    this.screen_name = in.readString();
    this.activities = in.readString();
    this.interests = in.readString();
    this.movies = in.readString();
    this.tv = in.readString();
    this.books = in.readString();
    this.games = in.readString();
    this.about = in.readString();
    this.quotes = in.readString();
    this.can_post = in.readByte() != 0;
    this.can_see_all_posts = in.readByte() != 0;
    this.can_write_private_message = in.readByte() != 0;
    this.wall_comments = in.readByte() != 0;
    this.is_banned = in.readByte() != 0;
    this.is_deleted = in.readByte() != 0;
    this.wall_default_owner = in.readByte() != 0;
    this.verified = in.readByte() != 0;
    this.sex = in.readInt();
    this.counters = in.readParcelable(Counters.class.getClassLoader());
    this.relation = in.readInt();
    this.relatives = in.readParcelable(VKList.class.getClassLoader());
    this.blacklisted_by_me = in.readByte() != 0;
}