Class CBORInt

All Implemented Interfaces:
Cloneable, Comparable<CBORObject>

public class CBORInt extends CBORObject
Class for holding CBOR int objects.
  • Constructor Details

    • CBORInt

      public CBORInt(long value, boolean unsigned)
      Creates a CBOR unsigned or negative int object.

      Unsigned integers range from 0 to 264-1, while valid negative integers range from -1 to -263.

      See also CBORBigInt(BigInteger) and CBORObject.getBigInteger().

      Parameters:
      value - long value
      unsigned - true if value should be considered as unsigned
      Throws:
      CBORException
    • CBORInt

      public CBORInt(long value)
      Creates a CBOR signed int object.

      This constructor is equivalent to CBORInt(value, value >= 0).

      Parameters:
      value - Java (signed) long type