code: public static String getMediaType(String ext) {
          String mediaType = "";
  
          // Find the media type value in the lookup table
          for (int i = 0; i < ApplicationMediaTypeMappings.length; i++) {
              if (ApplicationMediaTypeMappings[i][0].equals(ext.toLowerCase())) {
                  mediaType = ApplicationMediaTypeMappings[i][1];
              }
          }
  
          // Give the media type default of "application/octet-stream"
          if (mediaType.equals("")) {
              mediaType = "application/octet-stream";
          }
  
          return mediaType;
      }
docs: Returns the mime media type value for the given extension
  
  @param ext
  the filename extension to lookup
  @return String the mime type for the given extension