Package org.ldaptive.ad.transcode
Class FileTimeValueTranscoder
java.lang.Object
org.ldaptive.transcode.AbstractStringValueTranscoder<ZonedDateTime>
org.ldaptive.ad.transcode.FileTimeValueTranscoder
- All Implemented Interfaces:
ValueTranscoder<ZonedDateTime>
Decodes and encodes an active directory file time value for use in an ldap attribute value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
Number of milliseconds between standard Unix era (1/1/1970) and filetime start (1/1/1601).private static final long
File time uses 100-nanosecond intervals. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecodeStringValue
(String value) Decodes the supplied ldap attribute value into a custom type.encodeStringValue
(ZonedDateTime value) Encodes the supplied value into an ldap attribute value.getType()
Returns the type produced by this value transcoder.Methods inherited from class org.ldaptive.transcode.AbstractStringValueTranscoder
decodeBinaryValue, encodeBinaryValue
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
-
Field Details
-
ERA_OFFSET
private static final long ERA_OFFSETNumber of milliseconds between standard Unix era (1/1/1970) and filetime start (1/1/1601).- See Also:
-
ONE_HUNDRED_NANOSECOND_INTERVAL
private static final long ONE_HUNDRED_NANOSECOND_INTERVALFile time uses 100-nanosecond intervals. For conversion purposes this is 1x10^6 / 100.- See Also:
-
-
Constructor Details
-
FileTimeValueTranscoder
public FileTimeValueTranscoder()
-
-
Method Details
-
decodeStringValue
Description copied from interface:ValueTranscoder
Decodes the supplied ldap attribute value into a custom type.- Parameters:
value
- to decode- Returns:
- decoded value
-
encodeStringValue
Description copied from interface:ValueTranscoder
Encodes the supplied value into an ldap attribute value.- Parameters:
value
- to encode- Returns:
- encoded value
-
getType
Description copied from interface:ValueTranscoder
Returns the type produced by this value transcoder.- Returns:
- type produced by this value transcoder
-