Replaced getBufferLength() and setBufferLength() with a new method called
getBuffer() which directly returns the response StringBuffer.
This commit is contained in:
parent
d53076291d
commit
44a6159db5
1 changed files with 5 additions and 9 deletions
|
@ -185,19 +185,15 @@ public final class ResponseTrans implements Externalizable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the number of characters written to the response buffer so far.
|
||||
* Get the response buffer, creating it if it doesn't exist
|
||||
*/
|
||||
public int getBufferLength() {
|
||||
public StringBuffer getBuffer () {
|
||||
if (buffer == null)
|
||||
return 0;
|
||||
return buffer.length ();
|
||||
}
|
||||
|
||||
public void setBufferLength(int l) {
|
||||
if (buffer != null)
|
||||
buffer.setLength (l);
|
||||
buffer = new StringBuffer (INITIAL_BUFFER_SIZE);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Append a string to the response unchanged. This is often called
|
||||
* at the end of a request to write out the whole page, so if buffer
|
||||
|
|
Loading…
Add table
Reference in a new issue