File: DERFactory.java

package info (click to toggle)
pdftk 1.44-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,824 kB
  • sloc: java: 52,396; cpp: 4,377; ansic: 249; makefile: 215; sh: 8
file content (22 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package org.bouncycastle.asn1;

class DERFactory
{
    static final DERSequence EMPTY_SEQUENCE = new DERSequence();
    static final DERSet EMPTY_SET = new DERSet();

    static DERSequence createSequence(ASN1EncodableVector v)
    {
        return v.size() < 1 ? EMPTY_SEQUENCE : new DERSequence(v);
    }

    static DERSet createSet(ASN1EncodableVector v)
    {
        return v.size() < 1 ? EMPTY_SET : new DERSet(v);
    }

    static DERSet createSet(ASN1EncodableVector v, boolean needsSorting)
    {
        return v.size() < 1 ? EMPTY_SET : new DERSet(v, needsSorting);
    }
}