Package org.ldaptive.transcode
Class ObjectValueTranscoder
- java.lang.Object
-
- org.ldaptive.transcode.ObjectValueTranscoder
-
- All Implemented Interfaces:
ValueTranscoder<Object>
public class ObjectValueTranscoder extends Object implements ValueTranscoder<Object>
Decodes and encodes an object for use in an ldap attribute value.
-
-
Constructor Summary
Constructors Constructor Description ObjectValueTranscoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
decodeBinaryValue(byte[] value)
Decodes the supplied ldap attribute value into a custom type.Object
decodeStringValue(String value)
Decodes the supplied ldap attribute value into a custom type.byte[]
encodeBinaryValue(Object value)
Encodes the supplied value into an ldap attribute value.String
encodeStringValue(Object value)
Encodes the supplied value into an ldap attribute value.Class<Object>
getType()
Returns the type produced by this value transcoder.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ldaptive.transcode.ValueTranscoder
decoder, encoder
-
-
-
-
Method Detail
-
decodeStringValue
public Object decodeStringValue(String value)
Description copied from interface:ValueTranscoder
Decodes the supplied ldap attribute value into a custom type.- Specified by:
decodeStringValue
in interfaceValueTranscoder<Object>
- Parameters:
value
- to decode- Returns:
- decoded value
-
decodeBinaryValue
public Object decodeBinaryValue(byte[] value)
Description copied from interface:ValueTranscoder
Decodes the supplied ldap attribute value into a custom type.- Specified by:
decodeBinaryValue
in interfaceValueTranscoder<Object>
- Parameters:
value
- to decode- Returns:
- decoded value
-
encodeStringValue
public String encodeStringValue(Object value)
Description copied from interface:ValueTranscoder
Encodes the supplied value into an ldap attribute value.- Specified by:
encodeStringValue
in interfaceValueTranscoder<Object>
- Parameters:
value
- to encode- Returns:
- encoded value
-
encodeBinaryValue
public byte[] encodeBinaryValue(Object value)
Description copied from interface:ValueTranscoder
Encodes the supplied value into an ldap attribute value.- Specified by:
encodeBinaryValue
in interfaceValueTranscoder<Object>
- Parameters:
value
- to encode- Returns:
- encoded value
-
getType
public Class<Object> getType()
Description copied from interface:ValueTranscoder
Returns the type produced by this value transcoder.- Specified by:
getType
in interfaceValueTranscoder<Object>
- Returns:
- type produced by this value transcoder
-
-