Class UuidUtility

java.lang.Object
org.apache.arrow.vector.util.UuidUtility

public class UuidUtility extends Object
Utility class for UUID conversions and operations.

Provides methods to convert between UUID objects and byte representations used in Arrow vectors.

See Also:
  • Constructor Details

    • UuidUtility

      public UuidUtility()
  • Method Details

    • getBytesFromUUID

      public static byte[] getBytesFromUUID(UUID uuid)
      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

      public static UUID uuidFromArrowBuf(ArrowBuf buffer, long index)
      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 data
      index - the byte offset in the buffer where the UUID starts
      Returns:
      the UUID constructed from the buffer data