org.ldaptive.asn1
Class AttributeValueAssertion

java.lang.Object
  extended by org.ldaptive.asn1.AbstractDERType
      extended by org.ldaptive.asn1.AttributeValueAssertion
All Implemented Interfaces:
DEREncoder

public class AttributeValueAssertion
extends AbstractDERType
implements DEREncoder

An OID representing the type of attribute and its value.

Version:
$Revision: 3189 $ $Date: 2016-11-01 17:21:43 -0400 (Tue, 01 Nov 2016) $
Author:
Middleware Services

Nested Class Summary
static class AttributeValueAssertion.Value
          Class to represent the tag and value.
 
Constructor Summary
AttributeValueAssertion(String oid, AttributeValueAssertion.Value value)
          Creates a new attribute value assertion.
 
Method Summary
static AttributeValueAssertion[] decode(ByteBuffer encoded)
          Converts bytes in the buffer to attribute value assertions by reading from the current position to the limit.
 byte[] encode()
          Encode this object into it's DER type.
 boolean equals(Object o)
          
 String getOid()
          Returns the OID.
 AttributeValueAssertion.Value getValue()
          Returns the tag and value of the attribute.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class org.ldaptive.asn1.AbstractDERType
encode, readBuffer
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeValueAssertion

public AttributeValueAssertion(String oid,
                               AttributeValueAssertion.Value value)
Creates a new attribute value assertion.

Parameters:
oid - describing the attribute value
value - of the attribute
Method Detail

getOid

public String getOid()
Returns the OID.

Returns:
oid

getValue

public AttributeValueAssertion.Value getValue()
Returns the tag and value of the attribute.

Returns:
attribute value

encode

public byte[] encode()
Encode this object into it's DER type.

Specified by:
encode in interface DEREncoder
Returns:
DER encoded object

decode

public static AttributeValueAssertion[] decode(ByteBuffer encoded)
Converts bytes in the buffer to attribute value assertions by reading from the current position to the limit.

Parameters:
encoded - buffer containing DER-encoded data where the buffer is positioned at the tag of the oid and the limit is set beyond the last byte of attribute value data.
Returns:
decoded bytes as attribute value assertions

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.