org.apache.directory.shared.asn1.der
Class DERObject
java.lang.Object
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. |
tag
protected int tag
value
protected byte[] value
DERObject
protected DERObject(int tag,
byte[] value)
- Basic DERObject constructor.
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.