static int[] getLocalIP() {
		
		try {
			InetAddress addr = InetAddress.getLocalHost(); 
			
			byte[] ip = addr.getAddress(); 
			
			if( ip == null || ip.length != 4 ) {
				return null;
			} 
			
			int[] ret = new int[4];
			
			for( int cnt = 0;cnt<4;cnt++) {
				ret[cnt] = (int)ip[cnt];
				if( ret[cnt] < 0 ) {
					ret[cnt] += 256;
				}
			}
			
			return ret;
			
		} catch (UnknownHostException uhe ) {
			return null;
		}
		
	}