@Test public void toURL() throws Exception { String url = NetUtils.toURL("http", "192.168.0.1", 8888, "com.bocloud.Service"); Assert.assertEquals("http: }
public static String toURL(String protocol, String host, int port, String path) { StringBuilder sb = new StringBuilder(); sb.append(protocol).append(": sb.append(host).append(':').append(port); if (path.charAt(0) != '/') sb.append('/'); sb.append(path); return sb.toString(); }
NetUtils { public static String toURL(String protocol, String host, int port, String path) { StringBuilder sb = new StringBuilder(); sb.append(protocol).append(": sb.append(host).append(':').append(port); if (path.charAt(0) != '/') sb.append('/'); sb.append(path); return sb.toString(); } }
NetUtils { public static String toURL(String protocol, String host, int port, String path) { StringBuilder sb = new StringBuilder(); sb.append(protocol).append(": sb.append(host).append(':').append(port); if (path.charAt(0) != '/') sb.append('/'); sb.append(path); return sb.toString(); }  }
NetUtils { public static String toURL(String protocol, String host, int port, String path) { StringBuilder sb = new StringBuilder(); sb.append(protocol).append(": sb.append(host).append(':').append(port); if (path.charAt(0) != '/') sb.append('/'); sb.append(path); return sb.toString(); }  static int getRandomPort(); static int getAvailablePort(); static int getAvailablePort(int port); static boolean isValidAddress(String address); static boolean isLocalHost(String host); static boolean isAnyHost(String host); static boolean isInvalidLocalHost(String host); static boolean isValidLocalHost(String host); static InetSocketAddress getLocalSocketAddress(String host, int port); static String getLocalHost(); static String filterLocalHost(String host); static InetAddress getLocalAddress(); static String getLogHost(); static String getHostName(String address); static String getIpByHost(String hostName); static String toAddressString(InetSocketAddress address); static InetSocketAddress toAddress(String address); static String toURL(String protocol, String host, int port, String path); }
NetUtils { public static String toURL(String protocol, String host, int port, String path) { StringBuilder sb = new StringBuilder(); sb.append(protocol).append(": sb.append(host).append(':').append(port); if (path.charAt(0) != '/') sb.append('/'); sb.append(path); return sb.toString(); }  static int getRandomPort(); static int getAvailablePort(); static int getAvailablePort(int port); static boolean isValidAddress(String address); static boolean isLocalHost(String host); static boolean isAnyHost(String host); static boolean isInvalidLocalHost(String host); static boolean isValidLocalHost(String host); static InetSocketAddress getLocalSocketAddress(String host, int port); static String getLocalHost(); static String filterLocalHost(String host); static InetAddress getLocalAddress(); static String getLogHost(); static String getHostName(String address); static String getIpByHost(String hostName); static String toAddressString(InetSocketAddress address); static InetSocketAddress toAddress(String address); static String toURL(String protocol, String host, int port, String path); static final String LOCALHOST; static final String ANYHOST; }