| Modifier and Type | Field and Description |
|---|---|
static DotNetGuid4Codec |
INSTANCE
A shared immutable instance.
|
| Constructor and Description |
|---|
DotNetGuid4Codec() |
| Modifier and Type | Method and Description |
|---|---|
UUID |
decode(UUID uuid)
Get a random-based UUID (v4) from a .Net Guid.
|
UUID |
encode(UUID uuid)
Get a .Ned Guid from a random-based UUID (v4).
|
public static final DotNetGuid4Codec INSTANCE
public UUID encode(UUID uuid)
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).
encode in interface UuidCodec<UUID>uuid - a UUIDInvalidUuidException - if the argument is invalidpublic UUID decode(UUID uuid)
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 in interface UuidCodec<UUID>uuid - a UUIDInvalidUuidException - if the argument is invalidCopyright © 2024. All rights reserved.