The task is pretty simple, read the content of text file as one-liner. Here is what I came up with.
var filename = "engine.log";
var content = new java.lang.String(
java.nio.file.Files.readAllBytes(
java.nio.file.Paths.get(filename)
)
);