Engine.loadResourceAsString()
Signature
String loadResourceAsString(String uri, String encoding)
Domain
ACTION, CONDITION, QUERY, BUI
Description
When a relative path to a file is provided, then the contents of the file are returned in String format. The type of encoding to be used can be determined by the user. In case no encoding is provided, then UTF-8 is used by default.
Parameters
Name | Type | Description |
uri | String | Relative path of a file if any uri is provided, else null. |
encoding | String | Type of encoding to be used, if encoding mentioned is empty string or null, then UTF-8 would be used as default encoding. |
Returns
Type | Description |
String | Returns the contents of the file in String format after applying the encoding (UTF-8 by default). |