Package org.webpki.cbor
Class CBORInt
java.lang.Object
org.webpki.cbor.CBORObject
org.webpki.cbor.CBORInt
- All Implemented Interfaces:
Cloneable
,Comparable<CBORObject>
Class for holding CBOR
int
objects.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.webpki.cbor.CBORObject
checkForUnread, clone, compareTo, encode, equals, getArray, getBigInteger, getBoolean, getBytes, getDateTime, getEpochTime, getFloat16, getFloat32, getFloat64, getInt16, getInt32, getInt64, getInt8, getMap, getSimple, getString, getTag, getUint16, getUint32, getUint64, getUint8, hashCode, isNull, scan, toDiagnosticNotation, toString
-
Constructor Details
-
CBORInt
public CBORInt(long value, boolean unsigned) Creates a CBOR unsigned or negativeint
object.Unsigned integers range from
0
to264-1
, while valid negative integers range from-1
to-263
.See also
CBORBigInt(BigInteger)
.- Parameters:
value
- long valueunsigned
-true
if value should be considered as unsigned- Throws:
CBORException
-
CBORInt
public CBORInt(long value) Creates a CBOR signedint
object.See also
CBORInt(long,boolean)
andCBORBigInt(BigInteger)
.- Parameters:
value
- Java (signed) long type
-