public enum NutType extends Enum<NutType>
Enumeration of the possible types to be compressed and / or aggregated in WUIC.
Enum Constant and Description |
---|
APP_CACHE
Application cache files support.
|
CSS
CSS files support.
|
EOT
EOT path support.
|
GIF
GIF path support.
|
HTML
HTML files support.
|
ICO
ICO file.
|
JAVASCRIPT
Javascript files support.
|
MAP
MAP files support.
|
OTF
EOT path support.
|
PNG
PNG path support.
|
SVG
SVG path support.
|
TTF
TTF path support.
|
TYPESCRIPT
Typescript files support.
|
WOFF
WOFF path support.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getExtensions()
Returns the possible extensions.
|
String |
getHintInfo()
Gets the information for server hint.
|
String |
getMimeType()
Returns the MIME type.
|
static NutType |
getNutType(String path)
Computes the
NutType for the given path. |
static NutType |
getNutTypeForExtension(String ext)
Returns the
NutType which the given extension belongs to. |
static NutType |
getNutTypeForMimeType(String mimeType)
Returns the
NutType which the given mime type belongs to. |
String |
toString() |
static NutType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NutType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NutType HTML
getNutTypeForMimeType(String)
often use for HTML.public static final NutType EOT
public static final NutType OTF
public static final NutType TTF
public static final NutType WOFF
public static final NutType SVG
public static final NutType ICO
public static final NutType PNG
public static final NutType GIF
public static final NutType JAVASCRIPT
public static final NutType CSS
public static final NutType TYPESCRIPT
public static final NutType MAP
public static final NutType APP_CACHE
public static NutType[] values()
for (NutType c : NutType.values()) System.out.println(c);
public static NutType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String[] getExtensions()
Returns the possible extensions.
public String getMimeType()
Returns the MIME type.
public String getHintInfo()
Gets the information for server hint.
null
if nonepublic static NutType getNutTypeForExtension(String ext)
Returns the NutType
which the given extension belongs to.
Throws an BadArgumentException
if the extension does not belongs to any path type.
ext
- the extensionpublic static NutType getNutTypeForMimeType(String mimeType)
Returns the NutType
which the given mime type belongs to.
mimeType
- the mime typenull
if nothing matchCopyright © 2012-2015. All Rights Reserved.