Package org.springframework.boot.context.embedded.MimeMappings

Examples of org.springframework.boot.context.embedded.MimeMappings.Mapping


   * @param extension the file extension (excluding '.')
   * @param mimeType the mime type to map
   * @return any previous mapping or {@code null}
   */
  public String add(String extension, String mimeType) {
    Mapping previous = this.map.put(extension, new Mapping(extension, mimeType));
    return (previous == null ? null : previous.getMimeType());
  }
View Full Code Here


   * Get a mime mapping for the given extension.
   * @param extension the file extension (excluding '.')
   * @return a mime mapping or {@code null}
   */
  public String get(String extension) {
    Mapping mapping = this.map.get(extension);
    return (mapping == null ? null : mapping.getMimeType());
  }
View Full Code Here

   * Remove an existing mapping.
   * @param extension the file extension (excluding '.')
   * @return the removed mime mapping or {@code null} if no item was removed
   */
  public String remove(String extension) {
    Mapping previous = this.map.remove(extension);
    return (previous == null ? null : previous.getMimeType());
  }
View Full Code Here

      }
      if (obj == this) {
        return true;
      }
      if (obj instanceof Mapping) {
        Mapping other = (Mapping) obj;
        return this.extension.equals(other.extension)
            && this.mimeType.equals(other.mimeType);
      }
      return false;
    }
View Full Code Here

TOP

Related Classes of org.springframework.boot.context.embedded.MimeMappings.Mapping

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.