Package org.mozilla.jss.asn1
Class INTEGER
java.lang.Object
java.lang.Number
java.math.BigInteger
org.mozilla.jss.asn1.INTEGER
- All Implemented Interfaces:
Serializable
,Comparable<BigInteger>
,ASN1Value
- Direct Known Subclasses:
ENUMERATED
The ASN.1 type
INTEGER
. This class extends BigInteger.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class java.math.BigInteger
ONE, TEN, TWO, ZERO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
encode()
void
encode
(OutputStream outStream) Write this value's DER encoding to an output stream using its own base tag.void
encode
(Tag implicitTag, OutputStream outStream) Write this value's DER encoding to an output stream using an implicit tag.long
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static ASN1Template
static void
Tests the DER encoding and decoding of the INTEGER class.Methods inherited from class java.math.BigInteger
abs, add, and, andNot, bitCount, bitLength, byteValueExact, clearBit, compareTo, divide, divideAndRemainder, doubleValue, equals, flipBit, floatValue, gcd, getLowestSetBit, hashCode, intValue, intValueExact, isProbablePrime, longValue, longValueExact, max, min, mod, modInverse, modPow, multiply, negate, nextProbablePrime, not, or, pow, probablePrime, remainder, setBit, shiftLeft, shiftRight, shortValueExact, signum, sqrt, sqrtAndRemainder, subtract, testBit, toByteArray, toString, toString, valueOf, xor
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
TAG
-
FORM
-
-
Constructor Details
-
INTEGER
- Throws:
NumberFormatException
-
INTEGER
- Throws:
NumberFormatException
-
INTEGER
- Throws:
NumberFormatException
-
INTEGER
- Throws:
NumberFormatException
-
INTEGER
- Throws:
NumberFormatException
-
INTEGER
-
INTEGER
public INTEGER(long val) -
INTEGER
-
-
Method Details
-
getTag
Description copied from interface:ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. -
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using its own base tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
outStream
- Output stream.- Throws:
IOException
- If an error occurred.
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using an implicit tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
implicitTag
- Implicit tag.outStream
- Output stream.- Throws:
IOException
- If an error occurred.
-
getContentLength
public long getContentLength() -
encode
- Throws:
IOException
-
getTemplate
-
main
Tests the DER encoding and decoding of the INTEGER class.- Parameters:
args
- Arguments.
-