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

java.lang.Object
  extended by org.apache.directory.shared.asn1.der.DERObject
All Implemented Interfaces:
DEREncodable
Direct Known Subclasses:
DERApplicationSpecific, DERBitString, DERBoolean, DEREnumerated, DERInteger, DERNull, DERObjectIdentifier, DEROctetString, DERString, DERUnknownTag

public abstract class DERObject
extends Object
implements DEREncodable

DER object.


Field Summary
protected  int tag
           
protected  byte[] value
           
 
Constructor Summary
protected DERObject(int tag, byte[] value)
          Basic DERObject constructor.
 
Method Summary
 void encode(ASN1OutputStream out)
           
 boolean equals(Object o)
          Two DERObjects are equal if their underlying byte arrays are equal.
 int hashCode()
          Fast rotate left and XOR hashcode generator.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

protected int tag

value

protected byte[] value
Constructor Detail

DERObject

protected DERObject(int tag,
                    byte[] value)
Basic DERObject constructor.

Method Detail

encode

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

hashCode

public int hashCode()
Fast rotate left and XOR hashcode generator.

Overrides:
hashCode in class Object
Returns:
a hash code for the byte array backing this object.

equals

public boolean equals(Object o)
Two DERObjects are equal if their underlying byte arrays are equal.

Overrides:
equals in class Object
Returns:
true if the two DERObject underlying byte arrays are equal.


Copyright © 2004-2012. All Rights Reserved.