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

public Class TargetInformation

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

Target information extension for attributes certificates according to RFC 3281.
          SEQUENCE OF Targets

Field Summary

Modifier and TypeField and Description
private ASN1Sequence

Constructor Summary

AccessConstructor and Description
private
TargetInformation(ASN1Sequence
The ASN1Sequence.
seq
)

Constructor from a ASN1Sequence.

public
TargetInformation(Targets
A Targets instance.
targets
)

Constructs a target information from a single targets element.

public
TargetInformation(Target[]
An array with Targets.
targets
)

According to RFC 3281 only one targets element must be produced.

Method Summary

Modifier and TypeMethod and Description
public static TargetInformation

Returns:

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

Creates an instance of a TargetInformation from the given object.

public Targets[]

Returns:

Returns the targets.
getTargetsObjects
()

Returns the targets in this target information extension.

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

TargetInformationback to summary
private TargetInformation(ASN1Sequence seq)

Constructor from a ASN1Sequence.

Parameters
seq:ASN1Sequence

The ASN1Sequence.

Exceptions
IllegalArgumentException:
if the sequence does not contain correctly encoded Targets elements.
TargetInformationback to summary
public TargetInformation(Targets targets)

Constructs a target information from a single targets element. According to RFC 3281 only one targets element must be produced.

Parameters
targets:Targets

A Targets instance.

TargetInformationback to summary
public TargetInformation(Target[] targets)

According to RFC 3281 only one targets element must be produced. If multiple targets are given they must be merged in into one targets element.

Parameters
targets:Target[]

An array with Targets.

Method Detail

getInstanceback to summary
public static TargetInformation getInstance(Object obj)

Creates an instance of a TargetInformation from the given object.

obj can be a TargetInformation or a ASN1Sequence

Parameters
obj:Object

The object.

Returns:TargetInformation

A TargetInformation instance.

Exceptions
IllegalArgumentException:
if the given object cannot be interpreted as TargetInformation.
getTargetsObjectsback to summary
public Targets[] getTargetsObjects()

Returns the targets in this target information extension.

Returns:Targets[]

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:

         SEQUENCE OF Targets

According to RFC 3281 only one targets element must be produced. If multiple targets are given in the constructor they are merged into one targets element. If this was produced from a org.bouncycastle.asn1.ASN1Sequence the encoding is kept.

Returns:ASN1Primitive

a ASN1Primitive