Class SerialNumber
- java.lang.Object
-
- org.mozilla.jss.netscape.security.x509.SerialNumber
-
- All Implemented Interfaces:
java.io.Serializable
public class SerialNumber extends java.lang.Object implements java.io.Serializable
This class defines the SerialNumber class used by certificates.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SerialNumber(int num)
The default constructor for this class using int.SerialNumber(java.io.InputStream in)
Create the object, decoding the values from the passed stream.SerialNumber(java.math.BigInteger num)
The default constructor for this class using BigInteger.SerialNumber(BigInt num)
SerialNumber(DerInputStream in)
Create the object, decoding the values from the passed DER stream.SerialNumber(DerValue val)
Create the object, decoding the values from the passed DerValue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(DerOutputStream out)
Encode the SerialNumber in DER form to the stream.BigInt
getNumber()
Return the serial number.java.lang.String
toString()
Return the SerialNumber as user readable string.
-
-
-
Constructor Detail
-
SerialNumber
public SerialNumber(java.math.BigInteger num)
The default constructor for this class using BigInteger.- Parameters:
num
- the BigInteger number used to create the serial number.
-
SerialNumber
public SerialNumber(BigInt num)
-
SerialNumber
public SerialNumber(int num)
The default constructor for this class using int.- Parameters:
num
- the BigInteger number used to create the serial number.
-
SerialNumber
public SerialNumber(DerInputStream in) throws java.io.IOException
Create the object, decoding the values from the passed DER stream.- Parameters:
in
- the DerInputStream to read the SerialNumber from.- Throws:
java.io.IOException
- on decoding errors.
-
SerialNumber
public SerialNumber(DerValue val) throws java.io.IOException
Create the object, decoding the values from the passed DerValue.- Parameters:
val
- the DerValue to read the SerialNumber from.- Throws:
java.io.IOException
- on decoding errors.
-
SerialNumber
public SerialNumber(java.io.InputStream in) throws java.io.IOException
Create the object, decoding the values from the passed stream.- Parameters:
in
- the InputStream to read the SerialNumber from.- Throws:
java.io.IOException
- on decoding errors.
-
-
Method Detail
-
toString
public java.lang.String toString()
Return the SerialNumber as user readable string.- Overrides:
toString
in classjava.lang.Object
-
encode
public void encode(DerOutputStream out) throws java.io.IOException
Encode the SerialNumber in DER form to the stream.- Parameters:
out
- the DerOutputStream to marshal the contents to.- Throws:
java.io.IOException
- on errors.
-
getNumber
public BigInt getNumber()
Return the serial number.
-
-