Java2Snom
- Read more about Java2Snom
- Log in to post comments
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:" +