Package com.ferrumx.system.hardware
Class Win32_PhysicalMemory
java.lang.Object
com.ferrumx.system.hardware.Win32_PhysicalMemory
This class contains methods that query the Win32_PhysicalMemory class of WMI
to fetch RAM info.
The following properties are fetched: Name, Manufacturer, Model, OtherIdentifyingInfo, PartNumber, Tag, FormFactor, BankLabel, Capacity, DataWidth, Speed, ConfiguredClockSpeed, DeviceLocator, SerialNumber
- Author:
- Egg-03
-
Method Summary
Modifier and TypeMethodDescriptionFetches the properties mentioned in the class description based on the current memory stick Tag passed onto itgetTag()
Fetches a list of DeviceIDs of the memory sticks that are currently installed based on their Tag property
-
Method Details
-
getTag
public static List<String> getTag() throws IOException, IndexOutOfBoundsException, ShellException, InterruptedExceptionFetches a list of DeviceIDs of the memory sticks that are currently installed based on their Tag property- Returns:
- a
List
of the Tags of the memory sticks - Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertyValue(String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertyValue(String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-
getMemory
public static Map<String,String> getMemory(String memoryID) throws IOException, IndexOutOfBoundsException, ShellException, InterruptedException Fetches the properties mentioned in the class description based on the current memory stick Tag passed onto it- Parameters:
memoryID
- the memory Tag fetched fromgetTag()
- Returns:
- a
Map
of the properties and their values mentioned in the class description - Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-