code: public static FileType get(String filename) {
          for (Map.Entry<String, FileType> entry : MAP.entrySet()) {
              if (filename.toLowerCase().endsWith(entry.getKey())) {
                  return entry.getValue();
              }
          }
  
          return UNKNOWN;
      }
docs: Checks the suffix of the given string for an entry in the map. If it exists, the corresponding {@link FileType}
  entry will be returned.
  
  @param filename the filename to check
  @return a {@link FileType} entry for the file extension of the given name, or the UNKNOWN type if it does not
  exist