/** * Create a StringResource with the cached value read from the resource location. * @param location * @param escapeNeeded */ public StringResource(String location, boolean escapeNeeded) { this.content = get(location); this.escapeNeeded = escapeNeeded; } /**
/** * Create a StringResource with the cached value read from the resource location * @param location */ public StringResource(String location) { this.content = get(location); } /**
/** * Access the String contents from the given resource location. * The contents is cached by StringResource. Use get(location,false); for non-cached access. * @param location * @return resource contents , never null */ public static String get(String location) { return get(location, true); } /**
private static void amendReport() throws IOException { html.script().content(StringResource.get("/raphael/raphael-min.js"), NO_ESCAPE); html.script().content(StringResource.get("/prototype/prototype.js"), NO_ESCAPE); html.script().content(StringResource.get("/grafico/grafico-min.js"), NO_ESCAPE); html.write(graphs.toString(), NO_ESCAPE); html._body()._html(); }
private static void writeCss() throws IOException { html.style().write(StringResource.get("testCaseStyle.css"), NO_ESCAPE) ._style(); }
private void writeCss() throws IOException { html.style().write(StringResource.get("reportStyle.css"), NO_ESCAPE) ._style(); }