org.ldaptive.asn1
Class AbstractDERType

java.lang.Object
  extended by org.ldaptive.asn1.AbstractDERType
Direct Known Subclasses:
AttributeValueAssertion, BooleanType, ConstructedDEREncoder, ContextType, IntegerType, OctetStringType, OidType, UuidType

public abstract class AbstractDERType
extends Object

Provides functionality common to DER types implementations.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Constructor Summary
AbstractDERType(DERTag tag)
          Creates a new abstract der type.
 
Method Summary
protected  byte[] encode(byte[]... items)
          DER encode the supplied items with the tag associated with this type.
static byte[] readBuffer(ByteBuffer encoded)
          Returns a byte array containing the bytes from Buffer.limit() to Buffer.position().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDERType

public AbstractDERType(DERTag tag)
Creates a new abstract der type.

Parameters:
tag - to encode for this type
Method Detail

encode

protected byte[] encode(byte[]... items)
DER encode the supplied items with the tag associated with this type. If the length is greater than 127 bytes the long form is always expressed using 4 bytes.

Parameters:
items - to encode
Returns:
DER encoded items

readBuffer

public static byte[] readBuffer(ByteBuffer encoded)
Returns a byte array containing the bytes from Buffer.limit() to Buffer.position().

Parameters:
encoded - to read bytes from
Returns:
bytes


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