Replaced getBufferLength() and setBufferLength() with a new method called

getBuffer() which directly returns the response StringBuffer.
This commit is contained in:
hns 2003-02-04 14:18:10 +00:00
parent d53076291d
commit 44a6159db5

View file

@ -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