All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.oer.its.SequenceOfIdentifiedRegion Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java APIs for ASN.1 extension and utility APIs used to support bcpkix and bctls. This jar contains APIs for JDK 1.5 and up.

The newest version!
package org.bouncycastle.oer.its;

import java.util.Collections;
import java.util.List;

import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERSequence;

public class SequenceOfIdentifiedRegion
    extends ASN1Object
{

    private final List identifiedRegions;


    public SequenceOfIdentifiedRegion(List identifiedRegions)
    {
        this.identifiedRegions = Collections.unmodifiableList(identifiedRegions);
    }

    public static SequenceOfIdentifiedRegion getInstance(Object o)
    {
        if (o instanceof SequenceOfIdentifiedRegion)
        {
            return (SequenceOfIdentifiedRegion)o;
        }

        return new SequenceOfIdentifiedRegion(Utils.fillList(IdentifiedRegion.class, ASN1Sequence.getInstance(o)));
    }

    public List getIdentifiedRegions()
    {
        return identifiedRegions;
    }

    public ASN1Primitive toASN1Primitive()
    {
        return new DERSequence(identifiedRegions.toArray(new ASN1Encodable[0]));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy