in src/main/java/org/apache/sling/scripting/esx/Module.java [268:281]
public String readScript(Resource script) throws ScriptException {
InputStream is = script.getChild("jcr:content").adaptTo(InputStream.class);
BufferedReader esxScript = new BufferedReader(new InputStreamReader(is));
StringBuilder buffer = new StringBuilder();
String temp;
try {
while ((temp = esxScript.readLine()) != null) {
buffer.append(temp).append("\r\n");
}
return buffer.toString();
} catch (IOException ioex) {
throw new ScriptException(ioex);
}
}