Set a mime mapping.

@param extension Extension
@param type      Mime type
434834
public void addMimeMapping(String extension, String type) {
        handler.getMimeTypes().addMimeMapping(extension, type);
    }
926858
public void setContentType(String contentType) {
        if (contentType == null) {
            _properties.remove(AMQP_PROP_CONTENT_TYPE);
            return;
        }
        
        _properties.put(AMQP_PROP_CONTENT_TYPE, contentType);
    }
706047
public void setExtends(String superType) {
		if (!Strings.isEmpty(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.container, superType);
			this.sarlClass.setExtends(superTypeRef);
			return;
		}
		this.sarlClass.setExtends(null);
	}
295438
function populateMaps (extensions, types) {
  // source preference (least -> most)
  var preference = ['nginx', 'apache', undefined, 'iana']

  Object.keys(db).forEach(function forEachMimeType (type) {
    var mime = db[type]
    var exts = mime.extensions

    if (!exts || !exts.length) {
      return
    }

    // mime -> extensions
    extensions[type] = exts

    // extension -> mime
    for (var i = 0; i < exts.length; i++) {
      var extension = exts[i]

      if (types[extension]) {
        var from = preference.indexOf(db[types[extension]].source)
        var to = preference.indexOf(mime.source)

        if (types[extension] !== 'application/octet-stream' &&
          (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {
          // skip the remapping
          continue
        }
      }

      // set the extension -> mime
      types[extension] = type
    }
  })
}
621012
public String convertExtensionToMediaType(String extension) {
        ProvFormat format = extensionRevMap.get(extension);
        if (format == null)
            return null;
        return mimeTypeMap.get(format);
    }
955839
private void setMapType(int mapType) {
        final String methodName = "setMapType";
        if (tc.isDebugEnabled())
            Tr.debug(tc, methodName + " " + cache.getCacheName() + " MapTypeOld:" + this.mapType + " MapTypeNew:" + mapType);
        this.mapType = mapType;
    }
726647
public void setExtends(String superType) {
		if (!Strings.isEmpty(superType)
				&& !Agent.class.getName().equals(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.sarlAgent, superType);
			JvmTypeReference baseTypeRef = findType(this.sarlAgent, Agent.class.getCanonicalName());
			if (isSubTypeOf(this.sarlAgent, superTypeRef, baseTypeRef)) {
				this.sarlAgent.setExtends(superTypeRef);
				return;
			}
		}
		this.sarlAgent.setExtends(null);
	}
983723
public function setType($type)
    {
        if (is_string($type) === true) {
            $this->type = $type;
        } else {
            $msg = "The 'type' argument must be a non-empty string representing a mime-type, '" . gettype($type) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
429588
public void setType(java.lang.String type) {
        getStateHelper().put(PropertyKeys.type, type);
        handleAttribute("type", type);
    }
36145
public final void add(
      final GeneratedMessageLite.GeneratedExtension<?, ?> extension) {
    extensionsByNumber.put(
      new ObjectIntPair(extension.getContainingTypeDefaultInstance(),
                        extension.getNumber()),
      extension);
  }
24510
public void registerExtensions(final Class<?>... extensions) {
        for (Class<?> extension : extensions) {
            register(ConfigItem.Extension, extension);
        }
    }
1188404
public static void registerExtension (String extension, Class<? extends StreamDecoder> clazz)
    {
        _extensions.put(extension, clazz);
    }
15867
public String add(String extension, String mimeType) {
		Mapping previous = this.map.put(extension, new Mapping(extension, mimeType));
		return (previous != null) ? previous.getMimeType() : null;
	}
1044615
public function MapMimeTypeToExtension($extension, $mime_type)
    {
        if (!isset($this->extension_to_mime_types[$extension])) {
            $this->extension_to_mime_types[$extension] = array($mime_type);
        } else {
            $this->extension_to_mime_types[$extension][] = $mime_stype;
        }

        return true;
    }
638623
public void setFileExtensions(final String fileExtensions) {
    this.fileExtensions = IterableExtensions.<String>toList(((Iterable<String>)Conversions.doWrapArray(fileExtensions.trim().split("\\s*,\\s*"))));
  }
370316
def register_mime_type(mime_type, extensions: [], charset: nil)
      extnames = Array(extensions)

      charset ||= :default if mime_type.start_with?('text/')
      charset = EncodingUtils::CHARSET_DETECT[charset] if charset.is_a?(Symbol)

      self.config = hash_reassoc(config, :mime_exts) do |mime_exts|
        extnames.each do |extname|
          mime_exts[extname] = mime_type
        end
        mime_exts
      end

      self.config = hash_reassoc(config, :mime_types) do |mime_types|
        type = { extensions: extnames }
        type[:charset] = charset if charset
        mime_types.merge(mime_type => type)
      end
    end
1238143
public void addMimeMapping(final WebAppMimeMapping mimeMapping) {
		NullArgumentException.validateNotNull(mimeMapping, "Mime mapping");
		NullArgumentException.validateNotNull(mimeMapping.getExtension(),
				"Mime mapping extension");
		NullArgumentException.validateNotNull(mimeMapping.getMimeType(),
				"Mime mapping type");
		mimeMappings.add(mimeMapping);
	}