Class CFUtil

java.lang.Object
oshi.util.platform.mac.CFUtil

@ThreadSafe public final class CFUtil extends Object
CF String retrieving
  • Method Details

    • cfPointerToString

      public static String cfPointerToString(com.sun.jna.Pointer result)
      /** Convert a pointer to a CFString into a String.
      Parameters:
      result - Pointer to the CFString
      Returns:
      a CFString or "unknown" if it has no value
    • cfPointerToString

      public static String cfPointerToString(com.sun.jna.Pointer result, boolean returnUnknown)
      Convert a pointer to a CFString into a String.
      Parameters:
      result - Pointer to the CFString
      returnUnknown - Whether to return the "unknown" string
      Returns:
      a CFString including a possible empty one if returnUnknown is false, or "unknown" if it is true