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

public Class CertificateSerialNumber

extends Object
implements DerEncoder
Class Inheritance
All Implemented Interfaces
sun.security.util.DerEncoder
Imports
java.io.IOException, .InputStream, java.math.BigInteger, java.util.Random, sun.security.util.*

This class defines the SerialNumber attribute for the Certificate.
Authors
Amit Kapoor, Hemma Prafullchandra
See Also
DerEncoder

Field Summary

Modifier and TypeField and Description
public static final String
private SerialNumber

Constructor Summary

AccessConstructor and Description
public
CertificateSerialNumber(BigInteger
the serial number for the certificate.
num
)

Default constructor for the certificate attribute.

public
CertificateSerialNumber(int
the serial number for the certificate.
num
)

Default constructor for the certificate attribute.

public
CertificateSerialNumber(DerInputStream
the DerInputStream to read the serial number from.
in
)

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

public
CertificateSerialNumber(InputStream
the InputStream to read the serial number from.
in
)

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

public
CertificateSerialNumber(DerValue
the DER encoded value.
val
)

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

Method Summary

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

Implements sun.security.util.DerEncoder.encode.

Encode the serial number in DER form to the stream.

public SerialNumber
public static CertificateSerialNumber
newRandom64bit(Random rand)

Generates a new random serial number.

public String
toString()

Overrides java.lang.Object.toString.

Return the serial number as user readable string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

NAMEback to summary
public static final String NAME
serialback to summary
private SerialNumber serial

Constructor Detail

CertificateSerialNumberback to summary
public CertificateSerialNumber(BigInteger num)

Default constructor for the certificate attribute.

Parameters
num:BigInteger

the serial number for the certificate.

CertificateSerialNumberback to summary
public CertificateSerialNumber(int num)

Default constructor for the certificate attribute.

Parameters
num:int

the serial number for the certificate.

CertificateSerialNumberback to summary
public CertificateSerialNumber(DerInputStream in) throws IOException

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

Parameters
in:DerInputStream

the DerInputStream to read the serial number from.

Exceptions
IOException:
on decoding errors.
CertificateSerialNumberback to summary
public CertificateSerialNumber(InputStream in) throws IOException

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

Parameters
in:InputStream

the InputStream to read the serial number from.

Exceptions
IOException:
on decoding errors.
CertificateSerialNumberback to summary
public CertificateSerialNumber(DerValue val) throws IOException

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

Parameters
val:DerValue

the DER encoded value.

Exceptions
IOException:
on decoding errors.

Method Detail

encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

Encode the serial number in DER form to the stream.

Parameters
out:DerOutputStream

the DerOutputStream to marshal the contents to.

Annotations
@Override
getSerialback to summary
public SerialNumber getSerial()
newRandom64bitback to summary
public static CertificateSerialNumber newRandom64bit(Random rand)

Generates a new random serial number.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return the serial number as user readable string.