oshi.software.os.windows.nt

## Class OSVersionInfoEx

- java.lang.Object
- - oshi.software.os.windows.nt.OSVersionInfoEx

- All Implemented Interfaces:
    OperatingSystemVersion

      public class OSVersionInfoEx
      extends java.lang.Object
      implements OperatingSystemVersion

  Contains operating system version information. The information includes major and minor version numbers, a build number, a platform identifier, and descriptive text about the operating system.
  Author:
    dblock[at]dblock[dot]org

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OSVersionInfoEx()`
    `OSVersionInfoEx(com.sun.jna.platform.win32.WinNT.OSVERSIONINFOEX versionInfo)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBuildNumber()` The build number of the operating system.
    `int` | `getMajor()` The major version number of the operating system.
    `int` | `getMinor()` The minor version number of the operating system.
    `int` | `getPlatformId()` The operating system platform.
    `byte` | `getProductType()` Any additional information about the system.
    `java.lang.String` | `getServicePack()` String, such as "Service Pack 3", that indicates the latest Service Pack installed on the system.
    `int` | `getSuiteMask()` A bit mask that identifies the product suites available on the system.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### OSVersionInfoEx

          public OSVersionInfoEx()

    - #### OSVersionInfoEx

          public OSVersionInfoEx(com.sun.jna.platform.win32.WinNT.OSVERSIONINFOEX versionInfo)

  - ### Method Detail

    - #### getMajor

          public int getMajor()

      The major version number of the operating system.
      Returns:
        The major version within the following supported operating systems. Windows 8: 6.2 Windows Server 2012: 6.2 Windows 7: 6.1 Windows Server 2008 R2: 6.1 Windows Server 2008: 6.0 Windows Vista: 6.0 Windows Server 2003 R2: 5.2 Windows Home Server: 5.2 Windows Server 2003: 5.2 Windows XP Professional x64 Edition: 5.2 Windows XP: 5.1 Windows 2000: 5.0

    - #### getMinor

          public int getMinor()

      The minor version number of the operating system.
      Returns:
        The minor version within the following supported operating systems. Windows 8: 6.2 Windows Server 2012: 6.2 Windows 7: 6.1 Windows Server 2008 R2: 6.1 Windows Server 2008: 6.0 Windows Vista: 6.0 Windows Server 2003 R2: 5.2 Windows Home Server: 5.2 Windows Server 2003: 5.2 Windows XP Professional x64 Edition: 5.2 Windows XP: 5.1 Windows 2000: 5.0

    - #### getBuildNumber

          public int getBuildNumber()

      The build number of the operating system.
      Returns:
        Build number.

    - #### getPlatformId

          public int getPlatformId()

      The operating system platform. This member can be VER_PLATFORM_WIN32_NT.
      Returns:
        Platform ID.

    - #### getServicePack

          public java.lang.String getServicePack()

      String, such as "Service Pack 3", that indicates the latest Service Pack installed on the system. If no Service Pack has been installed, the string is empty.
      Returns:
        Service pack.

    - #### getSuiteMask

          public int getSuiteMask()

      A bit mask that identifies the product suites available on the system.
      Returns:
        Suite mask.

    - #### getProductType

          public byte getProductType()

      Any additional information about the system.
      Returns:
        Product type.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`