getResourceContent

open fun getResourceContent(pathname: String): String

Method to get the content of a resource file

Return

the content of a resource file as String

Parameters

pathname

: the pathname of the resource to get its content

Throws

when an error occurred during the fetching of the resource


open fun <T> getResourceContent(pathname: String, context: Class<T>): String

Method to get the content of a resource file

Return

the content of a resource file as String

Parameters

pathname

: the pathname of the resource to get its content

context

: the context class from get its classloader to reach the resources folder

<T>

the class type of the context e.g. MyCallingClass.class

Throws

when an error occurred during the fetching of the resource