code: protected String getContentType(String filename) {
  
  		String contentType = DEFAULT_CONTENT_TYPE;
  		if (fileTypeMap != null) {
  			contentType = fileTypeMap.getContentType(filename);
  		}
  		if (DEFAULT_CONTENT_TYPE.equals(contentType) && fileNameMap != null) {
  			String test = fileNameMap.getContentTypeFor(filename);
  			if (test != null) {
  				contentType = test;
  			}
  		}
  		return contentType;
  	}
docs: Returns the content type string for the specified filename based on the filename's extension.
  Uses use both MimetypeFileTypeMap and FileNameMap (from URLConnection) because
  MimetypeFileTypeMap provides a convenient way for the application to add new mappings, but
  doesn't provide any default mappings, while FileNameMap, from URLConnection, provides default
  mappings (via <java_home>/lib/content-types.properties) but without easy extensibility.
  
  @param filename
  the file name for which the content type is desired
  
  @return the content type (mime part) string, or application/octet-stream if no match is
  found.