GeneralNames.javaAPI DocAndroid 1.5 API1804Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.x509


public class GeneralNames extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
Constructors Summary
public GeneralNames(GeneralName name)
Construct a GeneralNames object containing one GeneralName.

name the name to be contained.

        this.seq = new DERSequence(name);
public GeneralNames(org.bouncycastle.asn1.ASN1Sequence seq)

        this.seq = seq;
Methods Summary
public static org.bouncycastle.asn1.x509.GeneralNamesgetInstance(java.lang.Object obj)

        if (obj == null || obj instanceof GeneralNames)
            return (GeneralNames)obj;

        if (obj instanceof ASN1Sequence)
            return new GeneralNames((ASN1Sequence)obj);

        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
public static org.bouncycastle.asn1.x509.GeneralNamesgetInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)

        return getInstance(ASN1Sequence.getInstance(obj, explicit));
public GeneralName[]getNames()

        GeneralName[]   names = new GeneralName[seq.size()];
        for (int i = 0; i != seq.size(); i++)
            names[i] = GeneralName.getInstance(seq.getObjectAt(i));
        return names;
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.
GeneralNames ::= SEQUENCE SIZE {1..MAX} OF GeneralName

        return seq;