* Implement res.resetBuffer() as proposed by Michael Platzer on helma-user.
Fixes bug 585: http://helma.org/bugs/show_bug.cgi?id=585
This commit is contained in:
parent
389ab31d9e
commit
cdb9a335e4
2 changed files with 16 additions and 0 deletions
|
@ -114,6 +114,13 @@ public class ResponseBean implements Serializable {
|
|||
res.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the response buffer, clearing all content previously written to it
|
||||
*/
|
||||
public void resetBuffer() {
|
||||
res.resetBuffer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ServletResponse instance for this Response.
|
||||
* Returns null for internal and XML-RPC requests.
|
||||
|
|
|
@ -170,6 +170,15 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
return reqtrans.getServletResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the current response buffer.
|
||||
*/
|
||||
public synchronized void resetBuffer() {
|
||||
if (buffer != null) {
|
||||
buffer.setLength(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the response object to its initial empty state.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue