public class

SerialNumber

extends Object
java.lang.Object
   ↳ sun.security.x509.SerialNumber

Class Overview

This class defines the SerialNumber class used by certificates.

Summary

Public Constructors
SerialNumber(BigInteger num)
The default constructor for this class using BigInteger.
SerialNumber(int num)
The default constructor for this class using int.
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.
SerialNumber(InputStream in)
Create the object, decoding the values from the passed stream.
Public Methods
void encode(DerOutputStream out)
Encode the SerialNumber in DER form to the stream.
BigInteger getNumber()
Return the serial number.
String toString()
Return the SerialNumber as user readable string.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SerialNumber (BigInteger num)

The default constructor for this class using BigInteger.

Parameters
num the BigInteger number used to create the serial number.

public SerialNumber (int num)

The default constructor for this class using int.

Parameters
num the BigInteger number used to create the serial number.

public SerialNumber (DerInputStream in)

Create the object, decoding the values from the passed DER stream.

Parameters
in the DerInputStream to read the SerialNumber from.
Throws
IOException on decoding errors.

public SerialNumber (DerValue val)

Create the object, decoding the values from the passed DerValue.

Parameters
val the DerValue to read the SerialNumber from.
Throws
IOException on decoding errors.

public SerialNumber (InputStream in)

Create the object, decoding the values from the passed stream.

Parameters
in the InputStream to read the SerialNumber from.
Throws
IOException on decoding errors.

Public Methods

public void encode (DerOutputStream out)

Encode the SerialNumber in DER form to the stream.

Parameters
out the DerOutputStream to marshal the contents to.
Throws
IOException on errors.

public BigInteger getNumber ()

Return the serial number.

public String toString ()

Return the SerialNumber as user readable string.

Returns
  • a string representation of the object.