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

public Class DistributionPointName

extends Object
implements DerEncoder
Class Inheritance
All Implemented Interfaces
sun.security.util.DerEncoder
Imports
java.io.IOException, java.util.Objects, sun.security.util.DerEncoder, .DerOutputStream, .DerValue

Represents the DistributionPointName ASN.1 type. It is used in the CRL Distribution Points Extension (OID = 2.5.29.31) and the Issuing Distribution Point Extension (OID = 2.5.29.28).

Its ASN.1 definition is:


    DistributionPointName ::= CHOICE {
        fullName                  [0] GeneralNames,
        nameRelativeToCRLIssuer   [1] RelativeDistinguishedName }

    GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName

    GeneralName ::= CHOICE {
        otherName                 [0] INSTANCE OF OTHER-NAME,
        rfc822Name                [1] IA5String,
        dNSName                   [2] IA5String,
        x400Address               [3] ORAddress,
        directoryName             [4] Name,
        ediPartyName              [5] EDIPartyName,
        uniformResourceIdentifier [6] IA5String,
        iPAddress                 [7] OCTET STRING,
        registeredID              [8] OBJECT IDENTIFIER }

    RelativeDistinguishedName ::= SET OF AttributeTypeAndValue

    AttributeTypeAndValue ::= SEQUENCE {
        type    AttributeType,
        value   AttributeValue }

    AttributeType ::= OBJECT IDENTIFIER

    AttributeValue ::= ANY DEFINED BY AttributeType

Instances of this class are designed to be immutable. However, since this is an internal API we do not use defensive cloning for values for performance reasons. It is the responsibility of the consumer to ensure that no mutable elements are modified.

Since
1.6
See Also
CRLDistributionPointsExtension, IssuingDistributionPointExtension

Field Summary

Modifier and TypeField and Description
private GeneralNames
private volatile int
private RDN
private static final byte
private static final byte

Constructor Summary

AccessConstructor and Description
public
DistributionPointName(GeneralNames
the name for the distribution point.
fullName
)

Creates a distribution point name using a full name.

public
DistributionPointName(RDN
the name of the distribution point relative to the name of the issuer of the CRL.
relativeName
)

Creates a distribution point name using a relative name.

public
DistributionPointName(DerValue
the DER-encoded value.
encoding
)

Creates a distribution point name from its DER-encoded form.

Method Summary

Modifier and TypeMethod and Description
public void
encode(DerOutputStream
the output stream.
out
)

Implements sun.security.util.DerEncoder.encode.

Encodes the distribution point name and writes it to the DerOutputStream.

public boolean

Returns:

true if objects match; false otherwise
equals
(Object
Object to be compared to this
obj
)

Overrides java.lang.Object.equals.

Compare an object to this distribution point name for equality.

public GeneralNames
getFullName()

Returns the full name for the distribution point or null if not set.

public RDN
getRelativeName()

Returns the relative name for the distribution point or null if not set.

public int

Returns:

the hash code for this distribution point name
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hash code for this distribution point name.

public String
toString()

Overrides java.lang.Object.toString.

Returns a printable string of the distribution point name.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

fullNameback to summary
private GeneralNames fullName
hashCodeback to summary
private volatile int hashCode
relativeNameback to summary
private RDN relativeName
TAG_FULL_NAMEback to summary
private static final byte TAG_FULL_NAME
TAG_RELATIVE_NAMEback to summary
private static final byte TAG_RELATIVE_NAME

Constructor Detail

DistributionPointNameback to summary
public DistributionPointName(GeneralNames fullName)

Creates a distribution point name using a full name.

Parameters
fullName:GeneralNames

the name for the distribution point.

Exceptions
IllegalArgumentException:
if fullName is null.
DistributionPointNameback to summary
public DistributionPointName(RDN relativeName)

Creates a distribution point name using a relative name.

Parameters
relativeName:RDN

the name of the distribution point relative to the name of the issuer of the CRL.

Exceptions
IllegalArgumentException:
if relativeName is null.
DistributionPointNameback to summary
public DistributionPointName(DerValue encoding) throws IOException

Creates a distribution point name from its DER-encoded form.

Parameters
encoding:DerValue

the DER-encoded value.

Exceptions
IOException:
on decoding error.

Method Detail

encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

Encodes the distribution point name and writes it to the DerOutputStream.

Parameters
out:DerOutputStream

the output stream.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Compare an object to this distribution point name for equality.

Parameters
obj:Object

Object to be compared to this

Returns:boolean

true if objects match; false otherwise

Annotations
@Override
getFullNameback to summary
public GeneralNames getFullName()

Returns the full name for the distribution point or null if not set.

getRelativeNameback to summary
public RDN getRelativeName()

Returns the relative name for the distribution point or null if not set.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hash code for this distribution point name.

Returns:int

the hash code for this distribution point name

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a printable string of the distribution point name.