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:com.bravo.ecm.service.ScannedFile.java

public void readFromParcel(Parcel parcel) {
    pathname = parcel.readString();//from w  ww .j a v a 2 s. c  om
    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);/* w  w  w. jav a2s  . c  om*/
    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;
}

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

public VKApiUserFull(Parcel in) {
    super(in);/*from  www .  ja va  2 s  .c om*/
    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.occupation = in.readParcelable(Occupation.class.getClassLoader());
    this.relation = in.readInt();
    this.relatives = in.readParcelable(VKList.class.getClassLoader());
    this.blacklisted_by_me = in.readByte() != 0;
}

From source file:com.owncloud.android.datamodel.OCFile.java

/**
 * Reconstruct from parcel//w w w.  j  a v a2  s.c o m
 *
 * @param source The source parcel
 */
private OCFile(Parcel source) {
    mId = source.readLong();
    mParentId = source.readLong();
    mLength = source.readLong();
    mCreationTimestamp = source.readLong();
    mModifiedTimestamp = source.readLong();
    mModifiedTimestampAtLastSyncForData = source.readLong();
    mRemotePath = source.readString();
    mLocalPath = source.readString();
    mMimeType = source.readString();
    try {
        mAvailableOfflineStatus = AvailableOfflineStatus.valueOf(source.readString());
    } catch (IllegalArgumentException x) {
        mAvailableOfflineStatus = AvailableOfflineStatus.NOT_AVAILABLE_OFFLINE;
    }
    mLastSyncDateForProperties = source.readLong();
    mLastSyncDateForData = source.readLong();
    mEtag = source.readString();
    mTreeEtag = source.readString();
    mSharedByLink = source.readInt() == 1;
    mPermissions = source.readString();
    mRemoteId = source.readString();
    mNeedsUpdateThumbnail = source.readInt() == 1;
    mIsDownloading = source.readInt() == 1;
    mEtagInConflict = source.readString();
    mSharedWithSharee = source.readInt() == 1;
    mPrivateLink = source.readString();

}

From source file:org.y20k.transistor.core.Station.java

protected Station(Parcel in) {
    TITLE = in.readString();/*  w  w w.  j ava2 s  . c  o  m*/
    StreamURI = in.readString();
    mStationFetchResults = in.readBundle(Bundle.class.getClassLoader());
    mPlayback = in.readByte() != 0; // true if byte != 0

    _ID = in.readLong();
    UNIQUE_ID = in.readString();
    SUBTITLE = in.readString();
    IMAGE_PATH = in.readString();
    IMAGE_FILE_NAME = in.readString();
    SMALL_IMAGE_FILE_NAME = in.readString();
    CONTENT_TYPE = in.readString();
    DESCRIPTION = in.readString();
    RATING = in.readInt();
    COMMA_SEPARATED_TAGS = in.readString();
    CATEGORY = in.readString();
    MarkdownDescription = in.readString();
    SMALL_IMAGE_PATH = in.readString();
    IS_FAVOURITE = in.readInt();
    THUMP_UP_STATUS = in.readString();

    LogHelper.v(LOG_TAG, "Station re-created from parcel. State of playback is: " + mPlayback);
}

From source file:fiskinfoo.no.sintef.fiskinfoo.Baseclasses.ToolEntry.java

protected ToolEntry(Parcel in) {
    id = in.readString();/*  w  w w.j  av a  2 s.  co  m*/
    coordinates = new ArrayList<>();
    in.readList(coordinates, Point.class.getClassLoader());
    geometry = GeometryType.createFromValue(in.readString());
    IMO = in.readString();
    IRCS = in.readString();
    MMSI = in.readString();
    RegNum = in.readString();
    VesselName = in.readString();
    VesselPhone = in.readString();
    VesselEmail = in.readString();
    ContactPersonEmail = in.readString();
    ContactPersonPhone = in.readString();
    ContactPersonName = in.readString();
    ToolTypeCode = ToolType.createFromValue(in.readString());
    Source = in.readString();
    Comment = in.readString();
    ShortComment = in.readString();
    RemovedTime = in.readString();
    SetupDateTime = in.readString();
    ToolId = in.readString();
    LastChangedDateTime = in.readString();
    LastChangedBySource = in.readString();
    toolStatus = ToolEntryStatus.createFromValue(in.readString());
    toolLogId = in.readInt();
}

From source file:android.app.Notification.java

/**
 * Unflatten the notification from a parcel.
 *///from   w ww.j ava 2 s . co m
public Notification(Parcel parcel) {
    int version = parcel.readInt();

    when = parcel.readLong();
    icon = parcel.readInt();
    number = parcel.readInt();
    if (parcel.readInt() != 0) {
        contentIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        deleteIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        tickerText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        tickerView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        contentView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        largeIcon = Bitmap.CREATOR.createFromParcel(parcel);
    }
    defaults = parcel.readInt();
    flags = parcel.readInt();
    if (parcel.readInt() != 0) {
        sound = Uri.CREATOR.createFromParcel(parcel);
    }

    audioStreamType = parcel.readInt();
    vibrate = parcel.createLongArray();
    ledARGB = parcel.readInt();
    ledOnMS = parcel.readInt();
    ledOffMS = parcel.readInt();
    iconLevel = parcel.readInt();

    if (parcel.readInt() != 0) {
        fullScreenIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }

    priority = parcel.readInt();

    kind = parcel.createStringArray(); // may set kind to null

    if (parcel.readInt() != 0) {
        extras = parcel.readBundle();
    }

    actions = parcel.createTypedArray(Action.CREATOR);
    if (parcel.readInt() != 0) {
        bigContentView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
}

From source file:android.app.FragmentState.java

public FragmentState(Parcel in) {
    mClassName = in.readString();//from   w  w  w .  jav a  2  s  .  c  om
    mIndex = in.readInt();
    mFromLayout = in.readInt() != 0;
    mFragmentId = in.readInt();
    mContainerId = in.readInt();
    mTag = in.readString();
    mRetainInstance = in.readInt() != 0;
    mDetached = in.readInt() != 0;
    mArguments = in.readBundle();
    mSavedFragmentState = in.readBundle();
}