Class SerialNumber

java.lang.Object
org.mozilla.jss.netscape.security.x509.SerialNumber
All Implemented Interfaces:
Serializable

public class SerialNumber extends Object implements Serializable
This class defines the SerialNumber class used by certificates.
Version:
1.5
See Also:
  • Field Details

  • Constructor Details

    • SerialNumber

      public SerialNumber(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 IOException
      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.
    • SerialNumber

      public SerialNumber(DerValue val) throws IOException
      Create the object, decoding the values from the passed DerValue.
      Parameters:
      val - the DerValue to read the SerialNumber from.
      Throws:
      IOException - on decoding errors.
    • SerialNumber

      public SerialNumber(InputStream in) throws IOException
      Create the object, decoding the values from the passed stream.
      Parameters:
      in - the InputStream to read the SerialNumber from.
      Throws:
      IOException - on decoding errors.
  • Method Details

    • construct

      private void construct(DerValue derVal) throws IOException
      Throws:
      IOException
    • toString

      public String toString()
      Return the SerialNumber as user readable string.
      Overrides:
      toString in class Object
    • encode

      public void encode(DerOutputStream out) throws IOException
      Encode the SerialNumber in DER form to the stream.
      Parameters:
      out - the DerOutputStream to marshal the contents to.
      Throws:
      IOException - on errors.
    • getNumber

      public BigInt getNumber()
      Return the serial number.