/* * Decompiled with CFR 0.152. */ package gearth.misc; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public final class RuntimeUtil { public static String getCommandOutput(String[] command) throws IOException { try { String line; Runtime rt = Runtime.getRuntime(); Process proc = rt.exec(command); BufferedReader stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream())); StringBuilder result = new StringBuilder(); while ((line = stdInput.readLine()) != null) { result.append(line); result.append("\n"); } return result.toString(); } catch (IOException e) { e.printStackTrace(); throw e; } } }