📄 bertaggedobject.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: BERTaggedObject.java
package jit.asn1;
import java.io.IOException;
import java.util.Enumeration;
// Referenced classes of package jit.asn1:
// DERTaggedObject, BERConstructedSequence, ASN1OutputStream, BEROutputStream,
// ASN1OctetString, BERConstructedOctetString, ASN1Sequence, ASN1Set,
// ASN1TaggedObject, DEROutputStream, DEREncodable
public class BERTaggedObject extends DERTaggedObject
{
public BERTaggedObject(int tagNo, DEREncodable obj)
{
super(tagNo, obj);
}
public BERTaggedObject(boolean explicit, int tagNo, DEREncodable obj)
{
super(explicit, tagNo, obj);
}
public BERTaggedObject(int tagNo)
{
super(false, tagNo, new BERConstructedSequence());
}
void encode(DEROutputStream out)
throws IOException
{
if((out instanceof ASN1OutputStream) || (out instanceof BEROutputStream))
{
out.write(0xa0 | tagNo);
out.write(128);
if(!empty)
if(!explicit)
{
if(obj instanceof ASN1OctetString)
{
Enumeration e;
if(obj instanceof BERConstructedOctetString)
{
e = ((BERConstructedOctetString)obj).getObjects();
} else
{
ASN1OctetString octs = (ASN1OctetString)obj;
BERConstructedOctetString berO = new BERConstructedOctetString(octs.getOctets());
e = berO.getObjects();
}
for(; e.hasMoreElements(); out.writeObject(e.nextElement()));
} else
if(obj instanceof ASN1Sequence)
{
for(Enumeration e = ((ASN1Sequence)obj).getObjects(); e.hasMoreElements(); out.writeObject(e.nextElement()));
} else
if(obj instanceof ASN1Set)
{
for(Enumeration e = ((ASN1Set)obj).getObjects(); e.hasMoreElements(); out.writeObject(e.nextElement()));
} else
{
throw new RuntimeException("not implemented: ".concat(String.valueOf(String.valueOf(obj.getClass().getName()))));
}
} else
{
out.writeObject(obj);
}
out.write(0);
out.write(0);
} else
{
super.encode(out);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -