derconstructedset.java

来自「java 文件下载器。可自定义」· Java 代码 · 共 62 行

JAVA
62
字号
// 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:   DERConstructedSet.java

package org.bouncycastle.asn1;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Enumeration;

// Referenced classes of package org.bouncycastle.asn1:
//			ASN1Set, DEREncodableVector, DEROutputStream, DEREncodable

/**
 * @deprecated Class DERConstructedSet is deprecated
 */

public class DERConstructedSet extends ASN1Set
{

	public DERConstructedSet()
	{
	}

	public DERConstructedSet(DEREncodable obj)
	{
		addObject(obj);
	}

	public DERConstructedSet(DEREncodableVector v)
	{
		for (int i = 0; i != v.size(); i++)
			addObject(v.get(i));

	}

	public void addObject(DEREncodable obj)
	{
		super.addObject(obj);
	}

	public int getSize()
	{
		return size();
	}

	void encode(DEROutputStream out)
		throws IOException
	{
		ByteArrayOutputStream bOut = new ByteArrayOutputStream();
		DEROutputStream dOut = new DEROutputStream(bOut);
		Object obj;
		for (Enumeration e = getObjects(); e.hasMoreElements(); dOut.writeObject(obj))
			obj = e.nextElement();

		dOut.close();
		byte bytes[] = bOut.toByteArray();
		out.writeEncoded(49, bytes);
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?