Package org.ldaptive.asn1
Class ContextType
- java.lang.Object
-
- org.ldaptive.asn1.AbstractDERType
-
- org.ldaptive.asn1.ContextType
-
- All Implemented Interfaces:
DEREncoder
public class ContextType extends AbstractDERType implements DEREncoder
Converts context types to their DER encoded format.
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
derItem
Data to encode.
-
Constructor Summary
Constructors Constructor Description ContextType(int index, boolean item)
Creates a new context type.ContextType(int index, byte[] item)
Creates a new context type.ContextType(int index, String item)
Creates a new context type.ContextType(int index, BigInteger item)
Creates a new context type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
encode()
Encode this object into its DER type.-
Methods inherited from class org.ldaptive.asn1.AbstractDERType
encode
-
-
-
-
Constructor Detail
-
ContextType
public ContextType(int index, byte[] item)
Creates a new context type.- Parameters:
index
- of this item in the contextitem
- to encode
-
ContextType
public ContextType(int index, String item)
Creates a new context type.- Parameters:
index
- of this item in the contextitem
- to encode
-
ContextType
public ContextType(int index, boolean item)
Creates a new context type.- Parameters:
index
- of this item in the contextitem
- to encode
-
ContextType
public ContextType(int index, BigInteger item)
Creates a new context type.- Parameters:
index
- of this item in the contextitem
- to encode
-
-
Method Detail
-
encode
public byte[] encode()
Description copied from interface:DEREncoder
Encode this object into its DER type.- Specified by:
encode
in interfaceDEREncoder
- Returns:
- DER encoded object
-
-