public String getCpuInfo() {
StringBuffer sb = new StringBuffer();
if (new File("/proc/cpuinfo").exists()) //Dosyanın Erişilebilirlik kontrolü
{
try {
BufferedReader br = new BufferedReader(new FileReader(new File("/proc/cpuinfo")));
String aLine;
while ((aLine = br.readLine()) != null) {
sb.append(aLine + "\n");
}
if (br != null) {
br.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return sb.toString();
}
Kodmatik Murat BEKLER | Donanıma can veren ruh, yazılımdır.