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

public Class Targets

extends ASN1Object
Class Inheritance
Imports
java.util.Enumeration, org.bouncycastle.asn1.ASN1Object, .ASN1Primitive, .ASN1Sequence, .DERSequence

Targets structure used in target information extension for attribute certificates from RFC 3281.
           Targets ::= SEQUENCE OF Target

           Target  ::= CHOICE {
             targetName          [0] GeneralName,
             targetGroup         [1] GeneralName,
             targetCert          [2] TargetCert
           }

           TargetCert  ::= SEQUENCE {
             targetCertificate    IssuerSerial,
             targetName           GeneralName OPTIONAL,
             certDigestInfo       ObjectDigestInfo OPTIONAL
           }
See Also
org.bouncycastle.asn1.x509.Target, org.bouncycastle.asn1.x509.TargetInformation

Field Summary

Modifier and TypeField and Description
private ASN1Sequence

Constructor Summary

AccessConstructor and Description
private
Targets(ASN1Sequence
The ASN.1 SEQUENCE.
targets
)

Constructor from ASN1Sequence.

public
Targets(Target[]
A Vector of Targets.
targets
)

Constructor from given targets.

Method Summary

Modifier and TypeMethod and Description
public static Targets

Returns:

A Targets instance.
getInstance
(Object
The object.
obj
)

Creates an instance of a Targets from the given object.

public Target[]

Returns:

Returns the targets.
getTargets
()

Returns the targets in a Vector.

public ASN1Primitive

Returns:

a ASN1Primitive
toASN1Primitive
()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.
Inherited from org.bouncycastle.asn1.ASN1Object:
equalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

targetsback to summary
private ASN1Sequence targets

Constructor Detail

Targetsback to summary
private Targets(ASN1Sequence targets)

Constructor from ASN1Sequence.

Parameters
targets:ASN1Sequence

The ASN.1 SEQUENCE.

Exceptions
IllegalArgumentException:
if the contents of the sequence are invalid.
Targetsback to summary
public Targets(Target[] targets)

Constructor from given targets.

The vector is copied.

Parameters
targets:Target[]

A Vector of Targets.

Exceptions
IllegalArgumentException:
if the vector contains not only Targets.
See Also
Target

Method Detail

getInstanceback to summary
public static Targets getInstance(Object obj)

Creates an instance of a Targets from the given object.

obj can be a Targets or a ASN1Sequence

Parameters
obj:Object

The object.

Returns:Targets

A Targets instance.

Exceptions
IllegalArgumentException:
if the given object cannot be interpreted as Target.
getTargetsback to summary
public Target[] getTargets()

Returns the targets in a Vector.

The vector is cloned before it is returned.

Returns:Target[]

Returns the targets.

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream. Returns:

           Targets ::= SEQUENCE OF Target
Returns:ASN1Primitive

a ASN1Primitive