Example usage for com.google.common.primitives UnsignedInts toString

List of usage examples for com.google.common.primitives UnsignedInts toString

Introduction

In this page you can find the example usage for com.google.common.primitives UnsignedInts toString.

Prototype

@CheckReturnValue
public static String toString(int x) 

Source Link

Document

Returns a string representation of x, where x is treated as unsigned.

Usage

From source file:suneido.database.immudb.DataRecord.java

@Override
public String toString() {
    String s = super.toString();
    if (address != 0)
        s += "@" + UnsignedInts.toString(address);
    return s;// w  w w  .ja  va  2s.c  om
}

From source file:com.torodb.mongowp.bson.abst.AbstractBsonTimestamp.java

@Override
public String toString() {
    return "{ \"$timestamp\": { \"t\": " + UnsignedInts.toString(getSecondsSinceEpoch()) + ", \"i\": "
            + UnsignedInts.toString(getOrdinal()) + "} }";
}

From source file:org.glukit.dexcom.sync.DecodingUtils.java

public static void validateCrc(int receiverCrc, byte[] content) {
    LOGGER.debug(format("Validating that [%s] matches crc value [%s]", toHexString(content),
            UnsignedInts.toString(receiverCrc)));

    int expectedCrc = DecodingUtils.getCrc16(content, 0, content.length - TRAILER_SIZE);

    if (receiverCrc != expectedCrc) {
        throw new IllegalStateException(format("Invalid crc, expected [%s], received [%s]",
                UnsignedInts.toString(expectedCrc), UnsignedInts.toString((receiverCrc))));
    }// www .  java  2 s. co m
}