java.lang.Object
oshi.util.EdidUtil
EDID parsing utility.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getDescriptorRangeLimits
(byte[] desc) Parse descriptor range limitsstatic byte[][]
getDescriptors
(byte[] edid) Get the VESA descriptorsstatic String
getDescriptorText
(byte[] desc) Parse descriptor textstatic int
getDescriptorType
(byte[] desc) Get the VESA descriptor typestatic int
getHcm
(byte[] edid) Get monitor width in cmstatic String
getManufacturerID
(byte[] edid) Gets the Manufacturer ID from (up to) 3 5-bit characters in bytes 8 and 9static String
getProductID
(byte[] edid) Gets the Product ID, bytes 10 and 11static String
getSerialNo
(byte[] edid) Gets the Serial number, bytes 12-15static String
getTimingDescriptor
(byte[] desc) Parse a detailed timing descriptorstatic int
getVcm
(byte[] edid) Get monitor height in cmstatic String
getVersion
(byte[] edid) Return the EDID versionstatic byte
getWeek
(byte[] edid) Return the week of year of manufacturestatic int
getYear
(byte[] edid) Return the year of manufacturestatic boolean
isDigital
(byte[] edid) Test if this EDID is a digital monitor based on byte 20static String
toString
(byte[] edid) Parse an EDID byte array into user-readable information
-
Method Details
-
getManufacturerID
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
Gets the Product ID, bytes 10 and 11- Parameters:
edid
- The EDID byte array- Returns:
- The product ID
-
getSerialNo
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
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
Parse a detailed timing descriptor- Parameters:
desc
- An 18-byte VESA descriptor- Returns:
- A string describing part of the detailed timing descriptor
-
getDescriptorRangeLimits
Parse descriptor range limits- Parameters:
desc
- An 18-byte VESA descriptor- Returns:
- A string describing some of the range limits
-
getDescriptorText
Parse descriptor text- Parameters:
desc
- An 18-byte VESA descriptor- Returns:
- Plain text starting at the 4th byte
-
toString
Parse an EDID byte array into user-readable information- Parameters:
edid
- An EDID byte array- Returns:
- User-readable text represented by the EDID
-