MimeMappings

open class MimeMappings : Iterable<T>

Simple server-independent abstraction for mime mappings. Roughly equivalent to the &lt;mime-mapping&gt; element traditionally found in web.xml.

Author

Phillip Webb

Guirong Hu

Since

2.0.0

Constructors

Link copied to clipboard
constructor()
Create a new empty MimeMappings instance.
constructor(mappings: MimeMappings)
Create a new MimeMappings instance from the specified mappings.
constructor(mappings: Map<String, String>)
Create a new MimeMappings from the specified mappings.

Types

Link copied to clipboard
class Mapping
A single mime mapping.

Properties

Link copied to clipboard
Default mime mapping commonly used.

Functions

Link copied to clipboard
open fun add(extension: String, mimeType: String): String
Add a new mime mapping.
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun forEach(action: Consumer<in T>)
Link copied to clipboard
open fun get(extension: String): String
Get a mime mapping for the given extension.
Link copied to clipboard
Returns all defined mappings.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
open fun lazyCopy(mappings: MimeMappings): MimeMappings
Create a new lazy copy of the given mappings that will only copy entries if the mappings are mutated.
Link copied to clipboard
open fun remove(extension: String): String
Remove an existing mapping.
Link copied to clipboard
Link copied to clipboard
Create a new unmodifiable view of the specified mapping.