📄 bertaggedobject.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: BERTaggedObject.java
package org.bouncycastle.asn1;
import java.io.IOException;
import java.util.Enumeration;
// Referenced classes of package org.bouncycastle.asn1:
// DERTaggedObject, ASN1OctetString, ASN1OutputStream, ASN1Sequence,
// ASN1Set, BERConstructedOctetString, BEROutputStream, BERSequence,
// 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 BERSequence());
}
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((new StringBuilder()).append("not implemented: ").append(obj.getClass().getName()).toString());
}
} else
{
out.writeObject(obj);
}
out.write(0);
out.write(0);
} else
{
super.encode(out);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -