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,18 +185,14 @@ 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) if (buffer == null)
return 0; buffer = new StringBuffer (INITIAL_BUFFER_SIZE);
return buffer.length (); return buffer;
} }
public void setBufferLength(int l) {
if (buffer != null)
buffer.setLength (l);
}
/** /**
* Append a string to the response unchanged. This is often called * Append a string to the response unchanged. This is often called