| 98 | } |
| 99 | |
| 100 | public static String getProp(String name) { |
| 101 | String line = null; |
| 102 | BufferedReader input = null; |
| 103 | try { |
| 104 | Process p = Runtime.getRuntime().exec("getprop " + name); |
| 105 | input = new BufferedReader(new InputStreamReader(p.getInputStream()), 1024); |
| 106 | line = input.readLine(); |
| 107 | input.close(); |
| 108 | } catch (IOException ex) { |
| 109 | return null; |
| 110 | } finally { |
| 111 | if (input != null) { |
| 112 | try { |
| 113 | input.close(); |
| 114 | } catch (IOException e) { |
| 115 | e.printStackTrace(); |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | return line; |
| 120 | } |
| 121 | } |