io.agora.rtc.utils

## Class Utils

- java.lang.Object
- - io.agora.rtc.utils.Utils

-     public class Utils
      extends java.lang.Object

  Utility class for common operations.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `Utils()` Default constructor for Utils.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `checkDirectoryExistsOrCreate(java.lang.String path)` Checks if a directory exists, and creates it if it doesn't exist.
    `static byte[]` | `getBytes(java.nio.ByteBuffer buffer)` Converts a ByteBuffer to a byte array.
    `static boolean` | `isNullOrEmpty(java.lang.String str)` Checks if a string is null or empty.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Utils

          private Utils()

      Default constructor for Utils.

  - ### Method Detail

    - #### isNullOrEmpty

          public static boolean isNullOrEmpty(java.lang.String str)

      Checks if a string is null or empty.
      Parameters:
        `str` - The string to check
      Returns:
        true if the string is null or empty, false otherwise

    - #### getBytes

          public static byte[] getBytes(java.nio.ByteBuffer buffer)

      Converts a ByteBuffer to a byte array.
      Parameters:
        `buffer` - The ByteBuffer to convert
      Returns:
        The byte array, or null if buffer is null

    - #### checkDirectoryExistsOrCreate

          public static boolean checkDirectoryExistsOrCreate(java.lang.String path)

      Checks if a directory exists, and creates it if it doesn't exist.
      Parameters:
        `path` - The directory path
      Returns:
        true if the directory exists or was created successfully, false otherwise