code: private String[] splitHostNames(String hostNames)
      {
          String[] hostArray = hostNames.split(Constants.COMMA);
          String[] hosts = new String[hostArray.length];
          for (int i = 0; i < hostArray.length; i++)
          {
              hosts[i] = hostArray[i].trim();
          }
          return hosts;
      }
docs: Split host names.
  
  @param hostNames
  the host names
  @return the string[]