APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.x509

public Class SerialNumber

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, java.math.BigInteger, java.util.HexFormat, sun.security.util.*

This class defines the SerialNumber class used by certificates.
Authors
Amit Kapoor, Hemma Prafullchandra

Field Summary

Modifier and TypeField and Description
private BigInteger

Constructor Summary

AccessConstructor and Description
public
SerialNumber(BigInteger
the BigInteger number used to create the serial number.
num
)

The default constructor for this class using BigInteger.

public
SerialNumber(int
the BigInteger number used to create the serial number.
num
)

The default constructor for this class using int.

public
SerialNumber(DerInputStream
the DerInputStream to read the SerialNumber from.
in
)

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

public
SerialNumber(DerValue
the DerValue to read the SerialNumber from.
val
)

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

public
SerialNumber(InputStream
the InputStream to read the SerialNumber from.
in
)

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

Method Summary

Modifier and TypeMethod and Description
private void
public void
encode(DerOutputStream
the DerOutputStream to marshal the contents to.
out
)

Encode the SerialNumber in DER form to the stream.

public BigInteger
getNumber()

Return the serial number.

public String
toString()

Overrides java.lang.Object.toString.

Return the SerialNumber as user readable string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

serialNumback to summary
private BigInteger serialNum

Constructor Detail

SerialNumberback to summary
public SerialNumber(BigInteger num)

The default constructor for this class using BigInteger.

Parameters
num:BigInteger

the BigInteger number used to create the serial number.

SerialNumberback to summary
public SerialNumber(int num)

The default constructor for this class using int.

Parameters
num:int

the BigInteger number used to create the serial number.

SerialNumberback to summary
public SerialNumber(DerInputStream in) throws IOException

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

Parameters
in:DerInputStream

the DerInputStream to read the SerialNumber from.

Exceptions
IOException:
on decoding errors.
SerialNumberback to summary
public SerialNumber(DerValue val) throws IOException

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

Parameters
val:DerValue

the DerValue to read the SerialNumber from.

Exceptions
IOException:
on decoding errors.
SerialNumberback to summary
public SerialNumber(InputStream in) throws IOException

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

Parameters
in:InputStream

the InputStream to read the SerialNumber from.

Exceptions
IOException:
on decoding errors.

Method Detail

constructback to summary
private void construct(DerValue derVal) throws IOException
encodeback to summary
public void encode(DerOutputStream out)

Encode the SerialNumber in DER form to the stream.

Parameters
out:DerOutputStream

the DerOutputStream to marshal the contents to.

getNumberback to summary
public BigInteger getNumber()

Return the serial number.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return the SerialNumber as user readable string.