Convert the delimiter String into Internet addresses with the
delimiter of provided
@param strAddress
@param delimiter
@return
350687
private Address[] getAddresses(List<String> strAddresses, String delimiter) throws OrganizationException {
		Address[] addressArray = new Address[strAddresses.size()];
		int count = 0;
		for (String addr : strAddresses)
		{
            try{
            	addressArray[count] = new InternetAddress(addr);
            	count++;
            }catch(Exception e){
            	throw new OrganizationException("Failed to parse the email address "+ addr +": "+e.getMessage());
            }
        }
        return addressArray;
	}
53826
public static NetworkAddress parse(String networkAddress) {
		NetworkAddress address = null;
		if (networkAddress != null) {
			String[] split = networkAddress.split("/");
			if (split.length == 2) {
				byte[] network = parseDottedQuad(split[0]);
				byte[] netmask = parseDottedQuad(split[1]);
				address = toNetworkAddress(network, netmask);
			}
			else {
				throw new IllegalArgumentException("Network address must be ip4Address/netMask");
			}
		}
		return address;
	}
309038
public static String getPublicIPAddress() throws Exception {
        final String IPV4_REGEX = "\\A(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}\\z";

        String ipAddr = null;
        Enumeration e = NetworkInterface.getNetworkInterfaces();
        while (e.hasMoreElements()) {
            NetworkInterface n = (NetworkInterface) e.nextElement();
            Enumeration ee = n.getInetAddresses();
            while (ee.hasMoreElements()) {
                InetAddress i = (InetAddress) ee.nextElement();

                // Pick the first non loop back address
                if ((!i.isLoopbackAddress() && i.isSiteLocalAddress()) ||
                    i.getHostAddress().matches(IPV4_REGEX)) {
                    ipAddr = i.getHostAddress();
                    break;
                }
            }
            if (ipAddr != null) {
                break;
            }
        }

        return ipAddr;
    }
638465
@Nonnull
    public String newPciAddresses(@Nonnegative int count, @Nonnull String separator) {
        StringBuilder buf = new StringBuilder();
        for (int i = 0; i < count; i++) {
            if (i > 0)
                buf.append(separator);
            buf.append(newPciAddress());
        }
        return buf.toString();
    }
1121074
protected String getHttpAddress(String httpAddress) {
        Matcher resolvedMatcher = INETSOCKETADDRESS_PATTERN.matcher(httpAddress);
        if (resolvedMatcher.matches()) {
            return defaultScheme + resolvedMatcher.group(1) + ":" + resolvedMatcher.group(2);
        }

        return null;
    }
210709
public static InetSocketAddress getRpcPortSocketAddress(WorkerNetAddress netAddress) {
    String host = netAddress.getHost();
    int port = netAddress.getRpcPort();
    return new InetSocketAddress(host, port);
  }
1065717
public static byte[] getRawAddress(final String ipv4Address) {
        final Matcher m = IPV4_ADDRESS.matcher(ipv4Address);
        if (!m.find()) {
            return null;
        }
        final byte[] addr = new byte[4];
        for (int i = 0; i < 4; i++) {
            final int intVal = Integer.parseInt(m.group(i+1)) & 0x00ff;
            addr[i] = (byte) intVal;
        }
        return addr;
    }
122633
String
rrToString() {
	InetAddress addr;
	try {
		addr = InetAddress.getByAddress(null, address);
	} catch (UnknownHostException e) {
		return null;
	}
	if (addr.getAddress().length == 4) {
		// Deal with Java's broken handling of mapped IPv4 addresses.
		StringBuffer sb = new StringBuffer("0:0:0:0:0:ffff:");
		int high = ((address[12] & 0xFF) << 8) + (address[13] & 0xFF);
		int low = ((address[14] & 0xFF) << 8) + (address[15] & 0xFF);
		sb.append(Integer.toHexString(high));
		sb.append(':');
		sb.append(Integer.toHexString(low));
		return sb.toString();
	}
	return addr.getHostAddress();
}
1199414
public static String ipV4Address() {
        StringBuffer sb = new StringBuffer();
        sb.append(JDefaultNumber.randomIntBetweenTwoNumbers(2, 254) + "");
        sb.append(".");
        sb.append(JDefaultNumber.randomIntBetweenTwoNumbers(2, 254) + "");
        sb.append(".");
        sb.append(JDefaultNumber.randomIntBetweenTwoNumbers(2, 254) + "");
        sb.append(".");
        sb.append(JDefaultNumber.randomIntBetweenTwoNumbers(2, 254) + "");

        return sb.toString();

    }
1039564
public static String asString(SocketAddress socketAddress) {
        final InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress;
        final InetAddress inetAddress = inetSocketAddress.getAddress();
        String host = inetSocketAddress.getHostName();
        if (inetAddress != null) {
            host = inetAddress.getHostAddress();
        }
        return host + ":" + inetSocketAddress.getPort();
    }
840592
function  WriteIpAddr (buffer, offset, ipstring) {
    var addr= ipstring.split('.');
    buffer.writeUInt8(parseInt(addr[3]), offset);
    buffer.writeUInt8(parseInt(addr[2]), offset + 1);
    buffer.writeUInt8(parseInt(addr[1]), offset + 2);
    buffer.writeUInt8(parseInt(addr[0]), offset + 3);
}
76309
public static String connectByDelimiter(Collection<String> strList, String delimiter) {
        assertStringListNotNull(strList);
        return doConnectByDelimiter(strList, delimiter, null);
    }
1334508
private boolean isIPV4address(String address) {
        StringTokenizer st = new StringTokenizer(address, ".");
        List<String> nodes = new ArrayList<String>();
        while (st.hasMoreTokens())
            nodes.add(st.nextToken());
        return (nodes.size() == 4);
    }
909573
private static CharSequence convertReverseDNSIPv6(String str, int suffixStartIndex) throws AddressStringException {
		StringBuilder builder = new StringBuilder(suffixStartIndex);
		StringBuilder low = new StringBuilder();
		StringBuilder high = new StringBuilder();
		int segCount = 0;
		for(int i = suffixStartIndex - 1; i >= 0; ) {
			boolean isRange = false;
			for(int j = 0; j < 4; j++) {
				char c1 = str.charAt(i--);
				if(i >= 0) {
					char c2 = str.charAt(i--);
					if(c2 == IPv4Address.SEGMENT_SEPARATOR) {
						if(c1 == IPAddress.SEGMENT_WILDCARD) {
							isRange = true;
							low.append('0');
							high.append('f');
						} else {
							if(isRange) {
								throw new AddressStringException(str, i + 1);
							}
							low.append(c1);
							high.append(c1);
						}
					} else if(c2 == IPAddress.RANGE_SEPARATOR) {
						high.append(c1);
						if(i >= 1) {
							c2 = str.charAt(i--);
							low.append(c2);
							boolean isFullRange = (c2 == '0' && c1 == 'f');
							if(isRange && !isFullRange) {
								throw new AddressStringException(str, i + 1);
							}
							c2 = str.charAt(i--);
							if(c2 != IPv4Address.SEGMENT_SEPARATOR) {
								throw new AddressStringException(str, i + 1);
							}
						} else {
							throw new AddressStringException(str, i);
						}
						isRange = true;
					} else {
						throw new AddressStringException(str, i + 1);
					}
				} else if(j < 3) {
					throw new AddressStringException(str, i + 1);
				} else {
					if(c1 == IPAddress.SEGMENT_WILDCARD) {
						isRange = true;
						low.append('0');
						high.append('f');
					} else {
						if(isRange) {
							throw new AddressStringException(str, 0);
						}
						low.append(c1);
						high.append(c1);
					}
				}
			}
			segCount++;
			if(builder.length() > 0) {
				builder.append(IPv6Address.SEGMENT_SEPARATOR);
			}
			builder.append(low);
			if(isRange) {
				builder.append(IPAddress.RANGE_SEPARATOR).append(high);
			}
			low.setLength(0);
			high.setLength(0);
		}
		if(segCount != IPv6Address.SEGMENT_COUNT) {
			throw new AddressStringException(str, 0);
		}
		return builder;
	}
1001259
public static String implode(String[] inputArr, String delimiter) {
        String implodedStr = "";

        implodedStr += inputArr[0];
        for (int i = 1; i < inputArr.length; i++) {
            implodedStr += delimiter;
            implodedStr += inputArr[i];
        }
        return implodedStr;
    }
1041820
private CommunicationParam buildParams(String addr) {
        CommunicationParam params = new CommunicationParam();
        String[] strs = StringUtils.split(addr, ":");
        if (strs == null || strs.length != 2) {
            throw new IllegalArgumentException("addr example: 127.0.0.1:1099");
        }
        InetAddress address = null;
        try {
            address = InetAddress.getByName(strs[0]);
        } catch (UnknownHostException e) {
            throw new CommunicationException("addr_error", "addr[" + addr + "] is unknow!");
        }
        params.setIp(address.getHostAddress());
        params.setPort(Integer.valueOf(strs[1]));
        return params;
    }
194731
public static Adresse of(Ort ort, String strasse, String hausnummer) {
        return new Adresse(ort, strasse, hausnummer);
    }