code: public Set<String> getMimeTypes() throws OSException {
          // lazy initialization
          if (mimeTypes == null) {
              mimeTypes = new HashSet<>();
  
              for (String path : MIME_TYPE_LISTS) {
                  File mimeListFile = new File(path);
                  if (mimeListFile.isFile() && mimeListFile.canRead()) {
                      try (BufferedReader br = new BufferedReader(new FileReader(mimeListFile))) {
                          for (String line; (line = br.readLine()) != null;) {
                              line = line.replaceAll("\\s+", "");
                              if (MIME_PATTERN.matcher(line).matches()) {
                                  mimeTypes.add(line);
                              }
                          }
                      } catch (IOException e) {
                          throw new OSException(e);
                      }
                  }
              }
          }
          return Collections.unmodifiableSet(mimeTypes);
      }
docs: Create a {@link Set} of all registered MIME types.
  
  @return Set of MIME types as String values
  @throws OSException