Package com.unboundid.util.ssl.cert
Class X509CertificateExtension
- java.lang.Object
-
- com.unboundid.util.ssl.cert.X509CertificateExtension
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AuthorityKeyIdentifierExtension,BasicConstraintsExtension,CRLDistributionPointsExtension,ExtendedKeyUsageExtension,GeneralAlternativeNameExtension,KeyUsageExtension,SubjectKeyIdentifierExtension
@NotExtensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class X509CertificateExtension extends java.lang.Object implements java.io.Serializable
This class represents a data structure that holds information about an X.509 certificate extension.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description X509CertificateExtension(OID oid, boolean isCritical, byte[] value)Creates a new X.509 certificate extension with the provided information.protectedX509CertificateExtension(X509CertificateExtension extension)Creates a new X.509 certificate extension that wraps the provided extension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetExtensionName()Retrieves the name for this extension.OIDgetOID()Retrieves the OID for this extension.byte[]getValue()Retrieves the value for this extension.booleanisCritical()Indicates whether this extension is considered critical.java.lang.StringtoString()Retrieves a string representation of this extension.voidtoString(java.lang.StringBuilder buffer)Appends a string representation of this certificate extension to the provided buffer.
-
-
-
Constructor Detail
-
X509CertificateExtension
protected X509CertificateExtension(X509CertificateExtension extension)
Creates a new X.509 certificate extension that wraps the provided extension.- Parameters:
extension- The extension to wrap.
-
X509CertificateExtension
public X509CertificateExtension(OID oid, boolean isCritical, byte[] value)
Creates a new X.509 certificate extension with the provided information.- Parameters:
oid- The OID for this extension.isCritical- Indicates whether this extension is considered critical.value- The value for this extension.
-
-
Method Detail
-
getOID
public final OID getOID()
Retrieves the OID for this extension.- Returns:
- The OID for this extension.
-
isCritical
public final boolean isCritical()
Indicates whether this extension is considered critical.- Returns:
trueif this extension is considered critical, orfalseif not.
-
getValue
public final byte[] getValue()
Retrieves the value for this extension.- Returns:
- The value for this extension.
-
getExtensionName
public java.lang.String getExtensionName()
Retrieves the name for this extension.- Returns:
- The name for this extension.
-
toString
public final java.lang.String toString()
Retrieves a string representation of this extension.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of this extension.
-
toString
public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this certificate extension to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended.
-
-