readResourceFile

fun readResourceFile(filename: String, classLoader: ClassLoader = defaultResourceClassLoader()): String

Reads the entire content of a classpath resource file as a String.

Return

the file content

Parameters

filename

the resource file name

classLoader

the classloader used to find filename; defaults to the thread context classloader

Throws

if the resource is not found