java.lang.Object
org.apache.arrow.vector.util.UuidUtility
Utility class for UUID conversions and operations.
Provides methods to convert between UUID objects and byte representations used in
Arrow vectors.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]getBytesFromUUID(UUID uuid) Converts a UUID to a 16-byte array.static UUIDuuidFromArrowBuf(ArrowBuf buffer, long index) Constructs a UUID from bytes stored in an ArrowBuf at the specified index.
-
Constructor Details
-
UuidUtility
public UuidUtility()
-
-
Method Details
-
getBytesFromUUID
Converts a UUID to a 16-byte array.The UUID is stored in big-endian byte order, with the most significant bits first.
- Parameters:
uuid- the UUID to convert- Returns:
- a 16-byte array representing the UUID
-
uuidFromArrowBuf
Constructs a UUID from bytes stored in an ArrowBuf at the specified index.Reads 16 bytes from the buffer starting at the given index and interprets them as a UUID in big-endian byte order.
- Parameters:
buffer- the buffer containing UUID dataindex- the byte offset in the buffer where the UUID starts- Returns:
- the UUID constructed from the buffer data
-