Package oshi.util

Class EdidUtil

java.lang.Object
oshi.util.EdidUtil

@ThreadSafe public final class EdidUtil extends Object
EDID parsing utility.
  • Method Details

    • getManufacturerID

      public static String getManufacturerID(byte[] edid)
      Gets the Manufacturer ID from (up to) 3 5-bit characters in bytes 8 and 9
      Parameters:
      edid - The EDID byte array
      Returns:
      The manufacturer ID
    • getProductID

      public static String getProductID(byte[] edid)
      Gets the Product ID, bytes 10 and 11
      Parameters:
      edid - The EDID byte array
      Returns:
      The product ID
    • getSerialNo

      public static String getSerialNo(byte[] edid)
      Gets the Serial number, bytes 12-15
      Parameters:
      edid - The EDID byte array
      Returns:
      If all 4 bytes represent alphanumeric characters, a 4-character string, otherwise a hex string.
    • getWeek

      public static byte getWeek(byte[] edid)
      Return the week of year of manufacture
      Parameters:
      edid - The EDID byte array
      Returns:
      The week of year
    • getYear

      public static int getYear(byte[] edid)
      Return the year of manufacture
      Parameters:
      edid - The EDID byte array
      Returns:
      The year of manufacture
    • getVersion

      public static String getVersion(byte[] edid)
      Return the EDID version
      Parameters:
      edid - The EDID byte array
      Returns:
      The EDID version
    • isDigital

      public static boolean isDigital(byte[] edid)
      Test if this EDID is a digital monitor based on byte 20
      Parameters:
      edid - The EDID byte array
      Returns:
      True if the EDID represents a digital monitor, false otherwise
    • getHcm

      public static int getHcm(byte[] edid)
      Get monitor width in cm
      Parameters:
      edid - The EDID byte array
      Returns:
      Monitor width in cm
    • getVcm

      public static int getVcm(byte[] edid)
      Get monitor height in cm
      Parameters:
      edid - The EDID byte array
      Returns:
      Monitor height in cm
    • getDescriptors

      public static byte[][] getDescriptors(byte[] edid)
      Get the VESA descriptors
      Parameters:
      edid - The EDID byte array
      Returns:
      A 2D array with four 18-byte elements representing VESA descriptors
    • getDescriptorType

      public static int getDescriptorType(byte[] desc)
      Get the VESA descriptor type
      Parameters:
      desc - An 18-byte VESA descriptor
      Returns:
      An integer representing the first four bytes of the VESA descriptor
    • getTimingDescriptor

      public static String getTimingDescriptor(byte[] desc)
      Parse a detailed timing descriptor
      Parameters:
      desc - An 18-byte VESA descriptor
      Returns:
      A string describing part of the detailed timing descriptor
    • getDescriptorRangeLimits

      public static String getDescriptorRangeLimits(byte[] desc)
      Parse descriptor range limits
      Parameters:
      desc - An 18-byte VESA descriptor
      Returns:
      A string describing some of the range limits
    • getDescriptorText

      public static String getDescriptorText(byte[] desc)
      Parse descriptor text
      Parameters:
      desc - An 18-byte VESA descriptor
      Returns:
      Plain text starting at the 4th byte
    • toString

      public static String toString(byte[] edid)
      Parse an EDID byte array into user-readable information
      Parameters:
      edid - An EDID byte array
      Returns:
      User-readable text represented by the EDID