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.vk.sdk.api.model.VKApiUniversity.java

/**
 * Creates a University instance from Parcel.
 *///from   w  ww  . ja v a  2 s  .  c o  m
public VKApiUniversity(Parcel in) {
    this.id = in.readInt();
    this.country_id = in.readInt();
    this.city_id = in.readInt();
    this.name = in.readString();
    this.faculty = in.readString();
    this.faculty_name = in.readString();
    this.chair = in.readInt();
    this.chair_name = in.readString();
    this.graduation = in.readInt();
    this.education_form = in.readString();
    this.education_status = in.readString();
}

From source file:br.ufrj.ppgi.jemf.mobile.bean.InterestPoint.java

/**
 * InterestPoint Parcelable Constructor.
 * Parcelable to get passed among activities through Intent (similar to Serialization).
 * Attention to class members order an this use FIFO method.
 *///from  w w w.j  av a 2  s  .  co  m
private InterestPoint(Parcel in) {
    setId(in.readInt());
    setStatusString(in.readString());
    setTimeStampString(in.readString());
    setInterval(in.readInt());
    setName(in.readString());
}

From source file:android.database.DatabaseUtils.java

public static void readExceptionWithOperationApplicationExceptionFromParcel(Parcel reply)
        throws OperationApplicationException {
    int code = reply.readInt();
    if (code == 0)
        return;/*from  w  w  w  .j  a va 2s  . co  m*/
    String msg = reply.readString();
    if (code == 10) {
        throw new OperationApplicationException(msg);
    } else {
        DatabaseUtils.readExceptionFromParcel(reply, msg, code);
    }
}

From source file:br.ufrj.ppgi.jemf.mobile.bean.Witness.java

/**
 * Witness Parcelable Constructor.// www  .  j  a  va 2  s . c  o m
 * Parcelable to get passed among activities through Intent (similar to Serialization).
 * Attention to class members order an this use FIFO method.
 */
private Witness(Parcel in) {
    setId(in.readInt());
    setName(in.readString());
    setGender(in.readInt());
    setBirthDateString(in.readString());
    setAge(in.readInt());
}

From source file:org.opendatakit.database.queries.BindArgs.java

protected BindArgs(Parcel in) {
    int dataCount = in.readInt();
    if (dataCount < 0) {
        bindArgs = null;//w ww  .j a v  a 2  s  .  co  m
    } else {
        Object[] result = new Object[dataCount];
        for (int i = 0; i < dataCount; ++i) {
            result[i] = unmarshallObject(in);
        }
        bindArgs = result;
    }
}

From source file:edu.umich.flowfence.common.QMDetails.java

public void readFromParcel(Parcel source) {
    final int length = source.readInt();
    final int endPos = source.dataPosition() + length;

    if (localLOGV) {
        Log.v(TAG, "Unparceling, length " + length);
    }//from   w  ww. j  a  v  a  2 s .c  om

    if (source.dataPosition() < endPos) {
        descriptor = QMDescriptor.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Descriptor: " + descriptor);
        }
    }
    if (source.dataPosition() < endPos) {
        resultType = source.readString();
        if (localLOGV) {
            Log.v(TAG, "Result type: " + resultType);
        }
    }
    if (source.dataPosition() < endPos) {
        paramInfo = source.createTypedArrayList(ParamInfo.CREATOR);
        if (paramInfo != null) {
            if (localLOGV) {
                Log.v(TAG, "Param info (size " + paramInfo.size() + "):");
                for (ParamInfo pi : paramInfo) {
                    Log.v(TAG, "    " + pi);
                }
            }
            paramInfo = Collections.unmodifiableList(paramInfo);
        } else if (localLOGV) {
            Log.v(TAG, "Param info (null)");
        }
    }
    if (source.dataPosition() < endPos) {
        requiredTaints = TaintSet.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Required taints: " + requiredTaints);
        }
    }
    if (source.dataPosition() < endPos) {
        optionalTaints = TaintSet.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Optional taints: " + optionalTaints);
        }
    }
    if (source.dataPosition() < endPos) {
        if (localLOGD) {
            Log.d(TAG, "Excess data at end of parcel");
        }
        source.setDataPosition(endPos);
    }
}

From source file:edu.umich.oasis.common.SodaDetails.java

public void readFromParcel(Parcel source) {
    final int length = source.readInt();
    final int endPos = source.dataPosition() + length;

    if (localLOGV) {
        Log.v(TAG, "Unparceling, length " + length);
    }/* w  ww . ja  v a  2  s .c  o  m*/

    if (source.dataPosition() < endPos) {
        descriptor = SodaDescriptor.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Descriptor: " + descriptor);
        }
    }
    if (source.dataPosition() < endPos) {
        resultType = source.readString();
        if (localLOGV) {
            Log.v(TAG, "Result type: " + resultType);
        }
    }
    if (source.dataPosition() < endPos) {
        paramInfo = source.createTypedArrayList(ParamInfo.CREATOR);
        if (paramInfo != null) {
            if (localLOGV) {
                Log.v(TAG, "Param info (size " + paramInfo.size() + "):");
                for (ParamInfo pi : paramInfo) {
                    Log.v(TAG, "    " + pi);
                }
            }
            paramInfo = Collections.unmodifiableList(paramInfo);
        } else if (localLOGV) {
            Log.v(TAG, "Param info (null)");
        }
    }
    if (source.dataPosition() < endPos) {
        requiredTaints = TaintSet.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Required taints: " + requiredTaints);
        }
    }
    if (source.dataPosition() < endPos) {
        optionalTaints = TaintSet.readFromParcel(source);
        if (localLOGV) {
            Log.v(TAG, "Optional taints: " + optionalTaints);
        }
    }
    if (source.dataPosition() < endPos) {
        if (localLOGD) {
            Log.d(TAG, "Excess data at end of parcel");
        }
        source.setDataPosition(endPos);
    }
}

From source file:com.google.android.apps.flexbox.FlexItem.java

protected FlexItem(Parcel in) {
    this.index = in.readInt();
    this.width = in.readInt();
    this.height = in.readInt();
    this.topMargin = in.readInt();
    this.startMargin = in.readInt();
    this.endMargin = in.readInt();
    this.bottomMargin = in.readInt();
    this.paddingTop = in.readInt();
    this.paddingStart = in.readInt();
    this.paddingEnd = in.readInt();
    this.paddingBottom = in.readInt();
    this.order = in.readInt();
    this.flexGrow = in.readFloat();
    this.flexShrink = in.readFloat();
    this.alignSelf = in.readInt();
    this.flexBasisPercent = in.readFloat();
    this.minWidth = in.readInt();
    this.minHeight = in.readInt();
    this.maxWidth = in.readInt();
    this.maxHeight = in.readInt();
    this.wrapBefore = in.readByte() != 0;
}

From source file:br.ufrj.ppgi.jemf.mobile.bean.Team.java

/**
 * Team Parcelable Constructor./*from  w w w .  j  av a 2s.  c o  m*/
 * Parcelable to get passed among activities through Intent (similar to Serialization).
 * Attention to class members order an this use FIFO method.
 */
private Team(Parcel in) {
    super(extractedLeader(in), extractedMembers(in));
    setId(in.readInt());
    setName(in.readString());
}

From source file:de.lebenshilfe_muenster.uk_gebaerden_muensterland.database.Sign.java

/**
 * Constructor for a sign which has been parcelled.
 *
 * @param in an Android parcel./*from   w  ww .  j  a  va 2  s . c  om*/
 */
private Sign(Parcel in) {
    this.id = in.readInt();
    this.name = in.readString();
    this.nameLocaleDe = in.readString();
    this.mnemonic = in.readString();
    this.starred = (boolean) in.readValue(getClass().getClassLoader());
    this.learningProgress = in.readInt();
}