Java2Snom

public String getSnomSetting(String phoneIp, String field) {
    String value = "";
 
    try {
        URL url = new URL("http://" + phoneIp + "/settings.htm");
        BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
 
        String inputLine;
        while ((inputLine = in.readLine()) != null) {
            if (inputLine.indexOf(field) == 0) {
                value = inputLine.substring(inputLine.indexOf(":") + 1).trim();
            }
        }
 
        in.close();
    } catch (Exception e) {
        System.out.println("[!] getSnomSetting:" + e.getMessage());
    }
 
    return value;
}