code: private static ExportFormat inferType(final File file) {
          final int index = file.getName().lastIndexOf(".");
          if (index == -1) {
              return null;
          }
  
          final String extension = file.getName().substring(index);
          if (extension.equals(KAM_EXTENSION)) {
              return ExportFormat.PORTABLE_KAM;
          } else if (extension.equals(XGMML_EXTENSION)) {
              return ExportFormat.XGMML;
          } else if (extension.equals(N3_EXTENSION)) {
              return ExportFormat.RDF;
          } else {
              return null;
          }
      }
docs: If {@link #determineType} returns {@code null} then this function may be able to determine
  an appropriate type of KAM file from its file extension.
  @param file
  @return