📄 generalsubtree.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: GeneralSubtree.java
package jit.asn1.x509;
import jit.asn1.*;
import jit.math.BigInteger;
// Referenced classes of package jit.asn1.x509:
// GeneralName
public class GeneralSubtree
implements DEREncodable
{
private GeneralName base;
private DERInteger minimum;
private DERInteger maximum;
public GeneralSubtree(ASN1Sequence seq)
{
base = GeneralName.getInstance(seq.getObjectAt(0));
switch(seq.size())
{
case 1: // '\001'
break;
case 2: // '\002'
ASN1TaggedObject o = (ASN1TaggedObject)seq.getObjectAt(1);
switch(o.getTagNo())
{
case 0: // '\0'
minimum = DERInteger.getInstance(o, false);
break;
case 1: // '\001'
maximum = DERInteger.getInstance(o, false);
break;
default:
throw new IllegalArgumentException("Bad tag number: ".concat(String.valueOf(String.valueOf(o.getTagNo()))));
}
break;
case 3: // '\003'
minimum = DERInteger.getInstance((ASN1TaggedObject)seq.getObjectAt(1), false);
maximum = DERInteger.getInstance((ASN1TaggedObject)seq.getObjectAt(2), false);
break;
default:
throw new IllegalArgumentException("Bad sequence size: ".concat(String.valueOf(String.valueOf(seq.size()))));
}
}
public GeneralSubtree(GeneralName base)
throws Exception
{
if(base == null)
{
throw new Exception("base must not be null");
} else
{
this.base = base;
return;
}
}
public GeneralSubtree(GeneralName base, BigInteger minimum, BigInteger maximum)
throws Exception
{
if(base == null)
throw new Exception("base must not be null");
this.base = base;
if(minimum != null)
this.minimum = new DERInteger(minimum);
if(maximum != null)
this.maximum = new DERInteger(maximum);
}
public GeneralSubtree(GeneralName base, BigInteger maximum)
throws Exception
{
if(base == null)
{
throw new Exception("base must not be null");
} else
{
this.base = base;
this.maximum = new DERInteger(maximum);
return;
}
}
public static GeneralSubtree getInstance(ASN1TaggedObject o, boolean explicit)
{
return new GeneralSubtree(ASN1Sequence.getInstance(o, explicit));
}
public static GeneralSubtree getInstance(Object obj)
{
if(obj == null)
return null;
if(obj instanceof GeneralSubtree)
return (GeneralSubtree)obj;
else
return new GeneralSubtree(ASN1Sequence.getInstance(obj));
}
public GeneralName getBase()
{
return base;
}
public BigInteger getMinimum()
{
if(minimum == null)
return BigInteger.valueOf(0L);
else
return minimum.getValue();
}
public BigInteger getMaximum()
{
if(maximum == null)
return null;
else
return maximum.getValue();
}
public DERObject getDERObject()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(base);
if(minimum != null)
v.add(new DERTaggedObject(false, 0, minimum));
if(maximum != null)
v.add(new DERTaggedObject(false, 1, maximum));
return new DERSequence(v);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -