Class DotNetGuid4Codec
- java.lang.Object
-
- com.github.f4b6a3.uuid.codec.uuid.DotNetGuid4Codec
-
-
Field Summary
Fields Modifier and Type Field Description static DotNetGuid4CodecINSTANCEA shared immutable instance.
-
Constructor Summary
Constructors Constructor Description DotNetGuid4Codec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UUIDdecode(UUID uuid)Convert a .Net Guid to a random-based UUID (v4).UUIDencode(UUID uuid)Codec for .Net Guids.
-
-
-
Field Detail
-
INSTANCE
public static final DotNetGuid4Codec INSTANCE
A shared immutable instance.
-
-
Method Detail
-
encode
public UUID encode(UUID uuid)
Codec for .Net Guids. This codec converts a random-based UUID (v4) to a .Net Guid. It rearranges the most significant bytes from big-endian to little-endian, and vice-versa. The .Net Guid stores the most significant bytes as little-endian, while the least significant bytes are stored as big-endian (network order).
-
decode
public UUID decode(UUID uuid)
Convert a .Net Guid to a random-based UUID (v4). It rearranges the most significant bytes from big-endian to little-endian, and vice-versa. The .Net Guid stores the most significant bytes as little-endian, while the least significant bytes are stored as big-endian (network order).
-
-