private int[] pickAutoDetectedLocalAddress() throws IOException {
  InetAddress addressObj=InetAddress.getLocalHost();
  byte[] addr=addressObj.getAddress();
  int b1=addr[0] & 0xff;
  int b2=addr[1] & 0xff;
  int b3=addr[2] & 0xff;
  int b4=addr[3] & 0xff;
  int[] ret={b1,b2,b3,b4};
  return ret;
}

private int [ ] pickAutoDetectedLocalAddress ( ) throws IOException { InetAddress addressObj = InetAddress . getLocalHost ( ) ; byte [ ] addr = addressObj . getAddress ( ) ; int b1 = addr [ 0 ] & 0xff ; int b2 = addr [ 1 ] & 0xff ; int b3 = addr [ 2 ] & 0xff ; int b4 = addr [ 3 ] & 0xff ; int [ ] ret = { b1 , b2 , b3 , b4 } ; return ret ; }
auto - detects the local network address , and returns it in the form of a 4 elements integer array .
