Package org.ldaptive.transcode
Class CertificateValueTranscoder
- java.lang.Object
-
- org.ldaptive.transcode.CertificateValueTranscoder
-
- All Implemented Interfaces:
ValueTranscoder<Certificate>
public class CertificateValueTranscoder extends Object implements ValueTranscoder<Certificate>
Decodes and encodes a certificate for use in an ldap attribute value.
-
-
Field Summary
Fields Modifier and Type Field Description private static StringBEGIN_CERTPEM cert header.private static StringEND_CERTPEM cert footer.
-
Constructor Summary
Constructors Constructor Description CertificateValueTranscoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CertificatedecodeBinaryValue(byte[] value)Decodes the supplied ldap attribute value into a custom type.CertificatedecodeStringValue(String value)Decodes the supplied ldap attribute value into a custom type.byte[]encodeBinaryValue(Certificate value)Encodes the supplied value into an ldap attribute value.StringencodeStringValue(Certificate value)Encodes the supplied value into an ldap attribute value.Class<Certificate>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 Certificate decodeStringValue(String value)
Description copied from interface:ValueTranscoderDecodes the supplied ldap attribute value into a custom type.- Specified by:
decodeStringValuein interfaceValueTranscoder<Certificate>- Parameters:
value- to decode- Returns:
- decoded value
-
decodeBinaryValue
public Certificate decodeBinaryValue(byte[] value)
Description copied from interface:ValueTranscoderDecodes the supplied ldap attribute value into a custom type.- Specified by:
decodeBinaryValuein interfaceValueTranscoder<Certificate>- Parameters:
value- to decode- Returns:
- decoded value
-
encodeStringValue
public String encodeStringValue(Certificate value)
Description copied from interface:ValueTranscoderEncodes the supplied value into an ldap attribute value.- Specified by:
encodeStringValuein interfaceValueTranscoder<Certificate>- Parameters:
value- to encode- Returns:
- encoded value
-
encodeBinaryValue
public byte[] encodeBinaryValue(Certificate value)
Description copied from interface:ValueTranscoderEncodes the supplied value into an ldap attribute value.- Specified by:
encodeBinaryValuein interfaceValueTranscoder<Certificate>- Parameters:
value- to encode- Returns:
- encoded value
-
getType
public Class<Certificate> getType()
Description copied from interface:ValueTranscoderReturns the type produced by this value transcoder.- Specified by:
getTypein interfaceValueTranscoder<Certificate>- Returns:
- type produced by this value transcoder
-
-