Example usage for android.os Parcel readInt

List of usage examples for android.os Parcel readInt

Introduction

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

Prototype

public final int readInt() 

Source Link

Document

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

Usage

From source file:net.issarlk.androbunny.inkbunny.Submission.java

public Submission(Parcel in) {
    if (in.readLong() != Submission.serialVersionUID) {
        throw new RuntimeException("Wrong UID");
    }//from   w w  w  .  j  a  v  a  2s . com
    this.id = in.readInt();
    this.hidden = in.readInt();
    this.user = User.CREATOR.createFromParcel(in);
    this.create_datetime = in.readString();
    this.create_datetime_usertime = in.readString();
    this.file_name = in.readString();
    this.thumbnails = new Thumbnail[in.readInt()];
    for (int i = this.thumbnails.length - 1; i >= 0; i--) {
        if (in.readInt() == 1) {
            this.thumbnails[i] = Thumbnail.CREATOR.createFromParcel(in);
        }
    }
    this.title = in.readString();
    this.deleted = in.readInt();
    this.s_public = in.readInt();
    this.mimetype = in.readString();
    this.rating = Rating.CREATOR.createFromParcel(in);
    this.submission_type = SubmissionType.CREATOR.createFromParcel(in);
    this.digitalsales = in.readInt();
    this.printsales = in.readInt();
    this.guest_block = in.readInt();

    // Full info
    if (in.readInt() == 1) {
        this.keywords = new Keyword[in.readInt()];
        for (int i = this.keywords.length - 1; i >= 0; i--) {
            this.keywords[i] = Keyword.CREATOR.createFromParcel(in);
        }
        this.scraps = in.readInt();
        this.favorite = in.readInt();
        this.favorites_count = in.readInt();
        this.comments_count = in.readInt();
        this.files = new File[in.readInt()];
        for (int i = this.files.length - 1; i >= 0; i--) {
            this.files[i] = File.CREATOR.createFromParcel(in);
        }
        this.file_urls = new URI[3];
        for (int i = 0; i < 3; i++) {
            String tmp = in.readString();
            if (tmp != null) {
                try {
                    this.file_urls[FULL] = new URI(tmp);
                } catch (URISyntaxException e) {
                    Log.e(TAG, e.toString());
                }
            }
        }
    }

    //Description      
    if (in.readInt() == 1) {
        this.description = in.readString();
    }

    //Writing
    if (in.readInt() == 1) {
        this.writing = in.readString();
    }
}

From source file:com.fanfou.app.opensource.api.bean.DirectMessage.java

public DirectMessage(final Parcel in) {
    this.id = in.readString();
    this.ownerId = in.readString();
    this.createdAt = new Date(in.readLong());
    this.type = in.readInt();

    this.senderId = in.readString();
    this.recipientId = in.readString();
    this.text = in.readString();

    this.senderScreenName = in.readString();
    this.recipientScreenName = in.readString();
    this.senderProfileImageUrl = in.readString();
    this.recipientProfileImageUrl = in.readString();

    this.threadUserId = in.readString();
    this.threadUserName = in.readString();

    this.isRead = in.readInt() == 0 ? false : true;
}

From source file:com.nextgis.maplib.datasource.ngw.Connection.java

protected Connection(Parcel in) {
    mName = in.readString();//  ww  w.  j ava2 s  .  c  o m
    mLogin = in.readString();
    mPassword = in.readString();
    mURL = in.readString();
    mIsConnected = in.readByte() == 1;
    mCookie = in.readString();
    mId = in.readInt();
    int count = in.readInt();
    mSupportedTypes = new ArrayList<>();
    for (int i = 0; i < count; i++)
        mSupportedTypes.add(in.readInt());
    mRootResource = in.readParcelable(ResourceGroup.class.getClassLoader());
    mRootResource.setConnection(this);
    mRootResource.setParent(this);
}

From source file:com.codebutler.farebot.transit.OrcaTransitData.java

public OrcaTransitData(Parcel parcel) {
    mSerialNumber = parcel.readInt();
    mBalance = parcel.readDouble();

    parcel.readInt();
    mTrips = (Trip[]) parcel.readParcelableArray(null);
}

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

protected ImportantContact(Parcel in) {
    contactId = in.readString();/*from   www . j  a  v  a2s  .c o  m*/
    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.google.android.apps.dashclock.api.ExtensionData.java

private ExtensionData(Parcel in) {
    int parcelableVersion = in.readInt();
    int parcelableSize = in.readInt();
    int startPosition = in.dataPosition();
    if (parcelableVersion >= 1) {
        this.mVisible = (in.readInt() != 0);
        this.mIcon = in.readInt();
        this.mStatus = in.readString();
        if (TextUtils.isEmpty(this.mStatus)) {
            this.mStatus = null;
        }//  w w  w . j  a v  a  2s  .co  m
        this.mExpandedTitle = in.readString();
        if (TextUtils.isEmpty(this.mExpandedTitle)) {
            this.mExpandedTitle = null;
        }
        this.mExpandedBody = in.readString();
        if (TextUtils.isEmpty(this.mExpandedBody)) {
            this.mExpandedBody = null;
        }
        try {
            this.mClickIntent = Intent.parseUri(in.readString(), 0);
        } catch (URISyntaxException ignored) {
        }
    }
    if (parcelableVersion >= 2) {
        this.mContentDescription = in.readString();
        if (TextUtils.isEmpty(this.mContentDescription)) {
            this.mContentDescription = null;
        }
        String iconUriString = in.readString();
        this.mIconUri = TextUtils.isEmpty(iconUriString) ? null : Uri.parse(iconUriString);
    }
    // Only advance the data position if the parcelable version is >= 2. In v1 of the
    // parcelable, there was an awful bug where the parcelableSize was complete nonsense.
    if (parcelableVersion >= 2) {
        in.setDataPosition(startPosition + parcelableSize);
    }
}

From source file:com.danlvse.weebo.model.User.java

protected User(Parcel in) {
    this.id = in.readString();
    this.idstr = in.readString();
    this.screen_name = in.readString();
    this.name = in.readString();
    this.province = in.readInt();
    this.city = in.readInt();
    this.location = in.readString();
    this.description = in.readString();
    this.url = in.readString();
    this.profile_image_url = in.readString();
    this.profile_url = in.readString();
    this.cover_image_phone = in.readString();
    this.cover_image = in.readString();
    this.domain = in.readString();
    this.weihao = in.readString();
    this.gender = in.readString();
    this.followers_count = in.readInt();
    this.friends_count = in.readInt();
    this.statuses_count = in.readInt();
    this.favourites_count = in.readInt();
    this.created_at = in.readString();
    this.following = in.readByte() != 0;
    this.allow_all_act_msg = in.readByte() != 0;
    this.geo_enabled = in.readByte() != 0;
    this.verified = in.readByte() != 0;
    this.verified_type = in.readInt();
    this.remark = in.readString();
    this.status = in.readParcelable(Feed.class.getClassLoader());
    this.allow_all_comment = in.readByte() != 0;
    this.avatar_large = in.readString();
    this.avatar_hd = in.readString();
    this.verified_reason = in.readString();
    this.follow_me = in.readByte() != 0;
    this.online_status = in.readInt();
    this.bi_followers_count = in.readInt();
    this.lang = in.readString();
    this.star = in.readString();
    this.mbtype = in.readString();
    this.mbrank = in.readString();
    this.block_word = in.readString();
}

From source file:com.amossys.hooker.common.InterceptEvent.java

/**
 * Read and write function to handle the returns list.
 * @param in// w ww.  ja  v  a  2s .c o m
 */
private void readReturnsEntry(Parcel in) {
    int tmp = in.readInt();
    if (tmp == 0) {

    } else {
        String key = in.readString();
        String value = in.readString();
        returns = new AbstractMap.SimpleEntry<String, String>(key, value);
    }
}

From source file:com.amossys.hooker.common.InterceptEvent.java

/**
 * Read and write functions to handle the parameters list.
 * @param in/*from w w w .ja  v  a 2s  . co  m*/
 */
private void readParametersList(Parcel in) {
    int size = in.readInt();
    if (size != 0) {
        for (int i = 0; i < size; i++) {
            String key = in.readString();
            String value = in.readString();
            parameters.add(new AbstractMap.SimpleEntry<String, String>(key, value));
        }
    }
}

From source file:com.amossys.hooker.common.InterceptEvent.java

/**
 * Read and write function to handle the data map.
 * @param in//  w  ww  . jav a 2 s  .com
 */
private void readDataMap(Parcel in) {
    int size = in.readInt();
    if (size != 0) {
        for (int i = 0; i < size; i++) {
            String key = in.readString();
            String value = in.readString();
            data.put(key, value);
        }
    }
}