org.apache.directory.shared.asn1.der
Class DERTaggedObject

java.lang.Object
  extended by org.apache.directory.shared.asn1.der.DERTaggedObject
All Implemented Interfaces:
DEREncodable
Direct Known Subclasses:
BERTaggedObject

public class DERTaggedObject
extends java.lang.Object
implements DEREncodable

DER TaggedObject


Field Summary
protected  boolean empty
           
protected  boolean explicit
           
protected  DEREncodable obj
           
protected  int tag
           
 
Constructor Summary
DERTaggedObject(boolean explicit, int tag, DEREncodable obj)
           
DERTaggedObject(boolean explicit, int tag, DEREncodable obj, byte[] bytes)
           
DERTaggedObject(int tag)
          create an implicitly tagged object that contains a zero length sequence.
DERTaggedObject(int tag, DEREncodable obj)
           
 
Method Summary
 void encode(ASN1OutputStream out)
           
 DEREncodable getObject()
          return whatever was following the tag.
 byte[] getOctets()
           
 int getTagNo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

protected int tag

empty

protected boolean empty

explicit

protected boolean explicit

obj

protected DEREncodable obj
Constructor Detail

DERTaggedObject

public DERTaggedObject(int tag)
create an implicitly tagged object that contains a zero length sequence.


DERTaggedObject

public DERTaggedObject(int tag,
                       DEREncodable obj)
Parameters:
tag - the tag number for this object.
obj - the tagged object.

DERTaggedObject

public DERTaggedObject(boolean explicit,
                       int tag,
                       DEREncodable obj)
Parameters:
explicit - true if an explicitly tagged object.
tag - the tag number for this object.
obj - the tagged object.

DERTaggedObject

public DERTaggedObject(boolean explicit,
                       int tag,
                       DEREncodable obj,
                       byte[] bytes)
Method Detail

getOctets

public byte[] getOctets()

getTagNo

public int getTagNo()

getObject

public DEREncodable getObject()
return whatever was following the tag.

Note: tagged objects are generally context dependent if you're trying to extract a tagged object you should be going via the appropriate getInstance method.


encode

public void encode(ASN1OutputStream out)
            throws java.io.IOException
Specified by:
encode in interface DEREncodable
Throws:
java.io.IOException


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.