Top Description Fields Constructors Methods
org.bouncycastle.asn1.x500

public Class X500NameBuilder

extends Object
Class Inheritance
Imports
java.util.Vector, org.bouncycastle.asn1.ASN1Encodable, .ASN1ObjectIdentifier, org.bouncycastle.asn1.x500.style.BCStyle

A builder class for making X.500 Name objects.

Field Summary

Modifier and TypeField and Description
private Vector<E>
private X500NameStyle

Constructor Summary

AccessConstructor and Description
public
X500NameBuilder()

Constructor using the default style (BCStyle).

public
X500NameBuilder(X500NameStyle
the style template for string to DN conversion.
template
)

Constructor using a specified style.

Method Summary

Modifier and TypeMethod and Description
public X500NameBuilder

Returns:

the current builder instance.
addMultiValuedRDN
(ASN1ObjectIdentifier[]
the OIDs making up the RDN.
oids
,
String[]
the string representation of the values the OIDs refer to.
values
)

Add a multi-valued RDN made up of the passed in OIDs and associated string values.

public X500NameBuilder

Returns:

the current builder instance.
addMultiValuedRDN
(ASN1ObjectIdentifier[]
the OIDs making up the RDN.
oids
,
ASN1Encodable[]
the ASN.1 values the OIDs refer to.
values
)

Add a multi-valued RDN made up of the passed in OIDs and associated ASN.1 values.

public X500NameBuilder

Returns:

the current builder instance.
addMultiValuedRDN
(AttributeTypeAndValue[]
the AttributeTypeAndValues to build the RDN from.
attrTAndVs
)

Add an RDN based on the passed in AttributeTypeAndValues.

public X500NameBuilder

Returns:

the current builder instance.
addRDN
(ASN1ObjectIdentifier
the OID for this RDN.
oid
,
String
the string representation of the value the OID refers to.
value
)

Add an RDN based on a single OID and a string representation of its value.

public X500NameBuilder

Returns:

the current builder instance.
addRDN
(ASN1ObjectIdentifier
the OID for this RDN.
oid
,
ASN1Encodable
the ASN.1 value the OID refers to.
value
)

Add an RDN based on a single OID and an ASN.1 value.

public X500NameBuilder

Returns:

the current builder instance.
addRDN
(AttributeTypeAndValue
the AttributeTypeAndValue to build the RDN from.
attrTAndV
)

Add an RDN based on the passed in AttributeTypeAndValue.

public X500Name

Returns:

a new X.500 name.
build
()

Build an X.500 name for the current builder state.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

rdnsback to summary
private Vector<E> rdns
templateback to summary
private X500NameStyle template

Constructor Detail

X500NameBuilderback to summary
public X500NameBuilder()

Constructor using the default style (BCStyle).

X500NameBuilderback to summary
public X500NameBuilder(X500NameStyle template)

Constructor using a specified style.

Parameters
template:X500NameStyle

the style template for string to DN conversion.

Method Detail

addMultiValuedRDNback to summary
public X500NameBuilder addMultiValuedRDN(ASN1ObjectIdentifier[] oids, String[] values)

Add a multi-valued RDN made up of the passed in OIDs and associated string values.

Parameters
oids:ASN1ObjectIdentifier[]

the OIDs making up the RDN.

values:String[]

the string representation of the values the OIDs refer to.

Returns:X500NameBuilder

the current builder instance.

addMultiValuedRDNback to summary
public X500NameBuilder addMultiValuedRDN(ASN1ObjectIdentifier[] oids, ASN1Encodable[] values)

Add a multi-valued RDN made up of the passed in OIDs and associated ASN.1 values.

Parameters
oids:ASN1ObjectIdentifier[]

the OIDs making up the RDN.

values:ASN1Encodable[]

the ASN.1 values the OIDs refer to.

Returns:X500NameBuilder

the current builder instance.

addMultiValuedRDNback to summary
public X500NameBuilder addMultiValuedRDN(AttributeTypeAndValue[] attrTAndVs)

Add an RDN based on the passed in AttributeTypeAndValues.

Parameters
attrTAndVs:AttributeTypeAndValue[]

the AttributeTypeAndValues to build the RDN from.

Returns:X500NameBuilder

the current builder instance.

addRDNback to summary
public X500NameBuilder addRDN(ASN1ObjectIdentifier oid, String value)

Add an RDN based on a single OID and a string representation of its value.

Parameters
oid:ASN1ObjectIdentifier

the OID for this RDN.

value:String

the string representation of the value the OID refers to.

Returns:X500NameBuilder

the current builder instance.

addRDNback to summary
public X500NameBuilder addRDN(ASN1ObjectIdentifier oid, ASN1Encodable value)

Add an RDN based on a single OID and an ASN.1 value.

Parameters
oid:ASN1ObjectIdentifier

the OID for this RDN.

value:ASN1Encodable

the ASN.1 value the OID refers to.

Returns:X500NameBuilder

the current builder instance.

addRDNback to summary
public X500NameBuilder addRDN(AttributeTypeAndValue attrTAndV)

Add an RDN based on the passed in AttributeTypeAndValue.

Parameters
attrTAndV:AttributeTypeAndValue

the AttributeTypeAndValue to build the RDN from.

Returns:X500NameBuilder

the current builder instance.

buildback to summary
public X500Name build()

Build an X.500 name for the current builder state.

Returns:X500Name

a new X.500 name.