public static String simpleHostname(String fullHostname){
  int offset=fullHostname.indexOf('.');
  if (offset != -1) {
    return fullHostname.substring(0,offset);
  }
  return fullHostname;
}

public static String simpleHostname ( String fullHostname ) { int offset = fullHostname . indexOf ( '.' ) ; if ( offset != - 1 ) { return fullHostname . substring ( 0 , offset ) ; } return fullHostname ; }
given a full hostname , return the word upto the first dot .
