com.softicar.platform.common.io.mime.IMimeType Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.io.mime;
/**
* Interface for media type descriptions.
*
* @author Alexander Schmidt
* @author Oliver Richers
*/
public interface IMimeType {
/**
* Returns the standardized identifier of this media type.
*
* @return the media type identifier
*/
String getIdentifier();
/**
* Determines whether this {@link IMimeType} is equal to the given
* {@link IMimeType}.
*
* @param otherMimeType
* the {@link IMimeType} to check against (never null)
* @return true if the types are the same; false otherwise
*/
default boolean is(IMimeType otherMimeType) {
return getIdentifier().toLowerCase().equals(otherMimeType.getIdentifier().toLowerCase());
}
static IMimeType createCustom(String customMimeType) {
return new CustomMimeType(customMimeType);
}
}