chg: allow variable amount of arguments in response methods

This commit is contained in:
Tobi Schäfer 2017-04-17 14:03:54 +02:00
parent 51b568f099
commit 1054413a10

View file

@ -203,8 +203,10 @@ public class ResponseBean implements Serializable {
*
* @param str the string to write to the response buffer
*/
public void write(String str) {
res.write(str);
public void write(String... str) {
for (String s : str) {
res.write(s);
}
}
/**
@ -212,8 +214,10 @@ public class ResponseBean implements Serializable {
*
* @param str the string to write to the response buffer
*/
public void writeln(String str) {
res.writeln(str);
public void writeln(String... str) {
for (String s : str) {
res.writeln(s);
}
}
/**
@ -237,9 +241,11 @@ public class ResponseBean implements Serializable {
*
* @param message the message
*/
public void debug(String message) {
public void debug(String... messages) {
for (String message : messages) {
res.debug(message);
}
}
/**
* Return a string representation for this object