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

NameTypeDescription
uriStringRelative path of a file if any uri is provided, else null.
encodingStringType of encoding to be used, if encoding mentioned is empty string or null, then UTF-8 would be used as default encoding.

Returns

TypeDescription
StringReturns the contents of the file in String format after applying the encoding (UTF-8 by default).

Cautions

none