Example usage for com.google.common.io.protocol ProtoBuf setInt

List of usage examples for com.google.common.io.protocol ProtoBuf setInt

Introduction

In this page you can find the example usage for com.google.common.io.protocol ProtoBuf setInt.

Prototype

public void setInt(int tag, int value) 

Source Link

Document

Sets the given tag to the given integer value.

Usage

From source file:com.codetastrophe.cellfinder.LocationFetcher.java

private ProtoBuf getCellularProfile(int lac, int cid, int mcc, int mnc) {
    Date now = new Date();

    ProtoBuf cellularProfile = new ProtoBuf(GcellularMessageTypes.GCELLULAR_PROFILE);
    cellularProfile.setLong(GCellularProfile.TIMESTAMP, now.getTime());
    cellularProfile.setInt(GCellularProfile.PREFETCH_MODE, GPrefetchMode.PREFETCH_MODE_MORE_NEIGHBORS);

    ProtoBuf primaryCell = new ProtoBuf(GcellularMessageTypes.GCELL);
    primaryCell.setInt(GCell.LAC, lac);/*w  w  w  .  j  a v a2 s .  co m*/
    primaryCell.setInt(GCell.CELLID, cid);
    primaryCell.setInt(GCell.MCC, mcc);
    primaryCell.setInt(GCell.MNC, mnc);

    cellularProfile.setProtoBuf(GCellularProfile.PRIMARY_CELL, primaryCell);

    return cellularProfile;
}