Implement global write() and writeln()

This commit is contained in:
hns 2003-06-26 16:51:18 +00:00
parent fd2882e21d
commit a70ace86bd

View file

@ -59,7 +59,7 @@ public class GlobalObject extends ScriptableObject {
"renderSkin", "renderSkinAsString", "getProperty",
"authenticate", "createSkin", "format", "encode",
"encodeXml", "encodeForm", "stripTags",
"getDBConnection", "getURL"
"getDBConnection", "getURL", "write", "writeln"
};
defineFunctionProperties(globalFuncs, GlobalObject.class, 0);
@ -305,6 +305,29 @@ public class GlobalObject extends ScriptableObject {
return HtmlEncoder.encode(str);
}
/**
*
*
* @param str ...
*
* @return ...
*/
public void write(String str) {
System.out.print(str);
}
/**
*
*
* @param str ...
*
* @return ...
*/
public void writeln(String str) {
System.out.println(str);
}
/**
*
*