session-android/src/org/thoughtcrime/bouncycastle/asn1/BERFactory.java
2011-12-20 10:20:44 -08:00

23 lines
600 B
Java

package org.thoughtcrime.bouncycastle.asn1;
class BERFactory
{
static final BERSequence EMPTY_SEQUENCE = new BERSequence();
static final BERSet EMPTY_SET = new BERSet();
static BERSequence createSequence(ASN1EncodableVector v)
{
return v.size() < 1 ? EMPTY_SEQUENCE : new BERSequence(v);
}
static BERSet createSet(ASN1EncodableVector v)
{
return v.size() < 1 ? EMPTY_SET : new BERSet(v);
}
static BERSet createSet(ASN1EncodableVector v, boolean needsSorting)
{
return v.size() < 1 ? EMPTY_SET : new BERSet(v, needsSorting);
}
}