public class ResourceUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceUtils.PathLocale |
| Modifier and Type | Field and Description |
|---|---|
static String |
MIN_POSTFIX_DEFAULT
The default postfix for minified names (ex: /css/mystyle.min.css)
|
static String |
MIN_POSTFIX_DEFAULT_AS_EXTENSION
The default postfix for minified names (ex: /css/mystyle.min.css)
|
| Constructor and Description |
|---|
ResourceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ResourceUtils.PathLocale |
getLocaleFromFilename(String path)
Extract the locale from the filename taking into account possible minimized resource name.
|
static String |
getMinifiedName(String name,
String minPostfix)
Return the minified version for a given resource name.
|
public static final String MIN_POSTFIX_DEFAULT
public static final String MIN_POSTFIX_DEFAULT_AS_EXTENSION
public static String getMinifiedName(String name, String minPostfix)
name - The original resource nameminPostfix - The postfix to use for minified namepublic static ResourceUtils.PathLocale getLocaleFromFilename(String path)
file_us_EN.min.js will correctly determine a locale of us_EN by
stripping the .min from the filename, the filename returned will be
file.min.js, if you want the .min to be removed as well, use
getLocaleFromFilename(String) instead.path - The file pathCopyright © 2006–2020 Apache Software Foundation. All rights reserved.