code: private static final String getExtension(String MIMETYPE) throws Exception {
          if (m_extensionMappings == null) {
              m_extensionMappings = readExtensionMappings(Server.FEDORA_HOME + "/server/" + Server.CONFIG_DIR + "/" + DATASTREAM_MAPPING_SOURCE_FILE);
          }
  
          String extension = m_extensionMappings.get(MIMETYPE);
          if (extension != null) {
              return extension;
          } else {
              return "";
          }
      }
docs: Get the file extension for a given MIMETYPE from the extensions mappings
  
  @param MIMETYPE
  @return
  @throws Exception