public static String asReadContent(JetPageContext ctx, String relativeName, String encoding) {
if (relativeName == null || relativeName.length() == 0) {
throw new IllegalArgumentException("argument relativeName is null or empty.");
}
String file = ctx.getAbsolutionName(relativeName);
Resource resource = ctx.getEngine().getResource(file);
if (encoding == null) {
encoding = ctx.getEngine().getConfig().getOutputEncoding();
}
return new String(resource.getSource(encoding));
}