oshi.hardware.platform.windows.WindowsFirmware Maven / Gradle / Ivy
/**
* Oshi (https://github.com/dblock/oshi)
*
* Copyright (c) 2010 - 2016 The Oshi Project Team
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Maintainers:
* dblock[at]dblock[dot]org
* widdis[at]gmail[dot]com
* enrico.bianchi[at]gmail[dot]com
*
* Contributors:
* https://github.com/dblock/oshi/graphs/contributors
*/
package oshi.hardware.platform.windows;
import java.time.Instant;
import java.time.ZoneOffset;
import java.util.List;
import java.util.Map;
import oshi.hardware.common.AbstractFirmware;
import oshi.util.platform.windows.WmiUtil;
import oshi.util.platform.windows.WmiUtil.ValueType;
/**
* Firmware data obtained from WMI
*
* @author SchiTho1 [at] Securiton AG
*/
final class WindowsFirmware extends AbstractFirmware {
private static final long serialVersionUID = 1L;
private static final ValueType[] BIOS_TYPES = { ValueType.STRING, ValueType.STRING, ValueType.STRING,
ValueType.STRING, ValueType.DATETIME };
WindowsFirmware() {
init();
}
private void init() {
final Map> win32BIOS = WmiUtil.selectObjectsFrom(null, "Win32_BIOS",
"Manufacturer,Name,Description,Version,ReleaseDate", "where PrimaryBIOS=true", BIOS_TYPES);
final List