Java tutorial
//package com.java2s; public class Main { protected static Integer WebServerPort = 8071; protected static String getURL(String ipaddr, String path, String params) { StringBuffer sb = new StringBuffer(); sb.append("http://"); sb.append(ipaddr); sb.append(":"); sb.append(String.valueOf(WebServerPort)); sb.append(path); if (params != null) { sb.append("?"); sb.append(params); } return sb.toString(); } }