for (int i = 0; i < 3; i++) { if ((set.length-1 < i) || ("".equals(set[i].getHost()))) { setAttributeByTagName(new String[] {"options", "remote"+i, "host"}, ""); setAttributeByTagName(new String[] {"options", "remote"+i, "port"}, "0"); } else { setAttributeByTagName(new String[] {"options", "remote"+i, "host"}, set[i].getHost()); setAttributeByTagName(new String[] {"options", "remote"+i, "port"}, Integer.toString(set[i].getXmlPort())); } } }
for (int i = 0; i < set.length; i++) { if ((set.length - 1 < i) || ("".equals(set[i].getHost()))) { propertyHandler.put("options_remote" + i + "_host", ""); propertyHandler.put("options_remote" + i + "_port", 0); } else { propertyHandler.put("options_remote" + i + "_host", set[i] .getHost()); propertyHandler.put("options_remote" + i + "_port", set[i] .getXmlPort()); } } }
    public void setConnectionsSet(ConnectionSettings[] set) {        for (int i = 0; i < 3; i++) {            if ((set.length-1 < i) || ("".equals(set[i].getHost()))) {                setAttributeByTagName(new String[] {"options", "remote"+i, "host"}, "");                setAttributeByTagName(new String[] {"options", "remote"+i, "port"}, "0");            } else {                setAttributeByTagName(new String[] {"options", "remote"+i, "host"}, set[i].getHost());                setAttributeByTagName(new String[] {"options", "remote"+i, "port"}, Integer.toString(set[i].getXmlPort()));            }        }    }