Package io.javalin.http
Enum ContentType
-
- All Implemented Interfaces:
-
java.io.Serializable
,kotlin.Comparable
public enum ContentType extends Enum<ContentType>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
ContentType.Companion
-
Field Summary
Fields Modifier and Type Field Description private final String
mimeType
private final Boolean
isHumanReadable
private final Array<out String>
extensions
private final String
name
private final Integer
ordinal
private final EnumEntries<ContentType>
entries
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description String
toString()
final ContentType
valueOf(String value)
Returns the enum constant of this type with the specified name. final Array<ContentType>
values()
Returns an array containing the constants of this enum type, in the order they're declared. final String
getMimeType()
Standardized mime-type final Boolean
isHumanReadable()
Utility property describes if given format is readable as a text or visible as media file by common tools, like e.g. final Array<out String>
getExtensions()
Common file extensions for this type final EnumEntries<ContentType>
getEntries()
List of mime types for the most common file types. -
-
Method Detail
-
valueOf
final ContentType valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
-
values
final Array<ContentType> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
getMimeType
final String getMimeType()
Standardized mime-type
-
isHumanReadable
final Boolean isHumanReadable()
Utility property describes if given format is readable as a text or visible as media file by common tools, like e.g. browsers
-
getExtensions
final Array<out String> getExtensions()
Common file extensions for this type
-
getEntries
final EnumEntries<ContentType> getEntries()
-
-
-
-