public static String getIPAddressByInterfaceName(String name) {
		String address = "NOT FOUND";
		try {
			NetworkInterface nif = NetworkInterface.getByName(name);
			for (InetAddress addr : Collections.list(nif
					.getInetAddresses())) {
				if (addr instanceof Inet4Address) {
					address = addr.getHostAddress();
					break;
				}
			}
		} catch (SocketException e) {
			e.printStackTrace();
		}
		return address;
	}