public String htmlString ()
{
String htmlString = null;
String filename = (String)valueForBinding(AWBindingNames.filename);
if (filename != null) {
AWResource resource = resourceManager().resourceNamed(filename);
if (resource != null) {
htmlString = (String)resource.object();
if ((htmlString == null) || (AWConcreteApplication.IsRapidTurnaroundEnabled && resource.hasChanged())) {
InputStream inputStream = resource.inputStream();
inputStream = new BufferedInputStream(inputStream);
htmlString = AWUtil.stringWithContentsOfInputStream(inputStream,
booleanValueForBinding("expectEncoding"));
AWUtil.close(inputStream);
if (htmlString == null) {
htmlString = "";
}
else {
// See AWGenericElement._TranslatedBindings
htmlString = EventPattern.matcher(htmlString).replaceAll("x$1");
}
resource.setObject(htmlString);
}
}
}
return htmlString;
}