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,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
|
||||||
|
|
Loading…
Add table
Reference in a new issue