code: private Format inferFormat(String dataFileName) {
          Format format = Format.inferFromFile(dataFileName);
          if (Format.UNSUPPORTED.equals(format)) {
              throw new UnsupportedDataFormatException("File " + dataFileName + " is not supported as data set format.");
          }
          return format;
      }
docs: Private methods