Мне нужно сравнить Dedicated Memory в коде с переменной ETH, как сделать?
package brainsoft.miner;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class check {
private int ETH = 5120;
public static void main(String[] args) {
try {
String filePath = "./brainminer.bm";
// Use "dxdiag /t" variant to redirect output to a given file
ProcessBuilder pb = new ProcessBuilder("cmd.exe","/c","dxdiag","/t",filePath);
System.out.println("-- GPU INFO --");
Process p = pb.start();
p.waitFor();
BufferedReader br = new BufferedReader(new FileReader(filePath));
String line;
System.out.println(String.format("-- Получение данных из %1$1s --",filePath));
while((line = br.readLine()) != null){
if(line.trim().startsWith("Card name:") || line.trim().startsWith("Dedicated Memory:") || line.trim().startsWith("Manufacturer:")){
System.out.println(line.trim());
}
}
} catch (IOException | InterruptedException ex) {
ex.printStackTrace();
}
}
}