mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add method and test
This commit is contained in:
@@ -6,6 +6,7 @@ import oshi.hardware.ComputerSystem;
|
||||
import oshi.hardware.GlobalMemory;
|
||||
import oshi.hardware.HWDiskStore;
|
||||
import oshi.hardware.HardwareAbstractionLayer;
|
||||
import oshi.hardware.NetworkIF;
|
||||
import oshi.hardware.Sensors;
|
||||
import oshi.software.os.OperatingSystem;
|
||||
|
||||
@@ -98,4 +99,15 @@ public class OshiUtil {
|
||||
public static HWDiskStore[] getDiskStores() {
|
||||
return hardware.getDiskStores();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网络相关信息,可能多块网卡
|
||||
* @return 网络相关信息
|
||||
* @since 5.3.5
|
||||
*/
|
||||
public static NetworkIF[] getNetworkIFs(){
|
||||
return hardware.getNetworkIFs();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user