FileDocCategorySizeDatePackage
DERApplicationSpecific.javaAPI DocAzureus 3.0.3.41332Tue Jun 08 05:12:56 BST 2004org.bouncycastle.asn1

DERApplicationSpecific

public class DERApplicationSpecific extends DERObject
Base class for an application specific object

Fields Summary
private int
tag
private byte[]
octets
Constructors Summary
public DERApplicationSpecific(int tag, byte[] octets)

		this.tag = tag;
		this.octets = octets;
	
public DERApplicationSpecific(int tag, DEREncodable object)

		this.tag = tag | DERTags.CONSTRUCTED;
		
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		DEROutputStream dos = new DEROutputStream(baos);
		
		dos.writeObject(object);
		
		this.octets = baos.toByteArray();
	
Methods Summary
voidencode(DEROutputStream out)

        out.writeEncoded(DERTags.APPLICATION | tag, octets);
    
public intgetApplicationTag()

		return tag & 0x1F;
	
public byte[]getContents()

		return octets;
	
public DERObjectgetObject()

		return new ASN1InputStream(new ByteArrayInputStream(getContents())).readObject();
	
public booleanisConstructed()

		return (tag & DERTags.CONSTRUCTED) != 0;