Class Information
Package: com.onepg.util
Class Name: ResourcesUtil
Description
Resource file utility class.
- Reads resource files.
- The resource file storage directory (hereinafter referred to as resource directory) is the resources
directory directly under the application deployment directory and is fixed relative to the application deployment directory.
[Example] For application/lib/program.jar, it is under application/resources/.
For details on the application deployment directory, refer toPropertiesUtil#APPLICATION_DIR_PATH. - Assumes that the character set of resource files is UTF-8.
- Resource file names are flexible, but the following file names are reserved for framework components and cannot be used.
msg.json
Enumeration List
FwResourceName
public enum FwResourceName
Framework-reserved resource file names.
Constants
MSG
Method List
getJson
public IoItems getJson(FwResourceName resourceName)
Gets framework-reserved resource JSON.
- Reads the JSON file under the resource directory and returns it as a map.
- The returned map is read-only.
Parameters
| Name | Type | Description |
|---|---|---|
resourceName |
FwResourceName |
Framework-reserved resource name |
Return Value
IoItems - Map
getJson
public IoItems getJson(String fileName)
Gets resource JSON.
- Reads the JSON file under the resource directory and returns it as a map.
- The returned map is read-only.
Parameters
| Name | Type | Description |
|---|---|---|
fileName |
String |
JSON file name |
Return Value
IoItems - Map