MCPcopy Create free account
hub / github.com/apache/tomcat / recycle

Method recycle

java/org/apache/catalina/connector/OutputBuffer.java:180–200  ·  view source on GitHub ↗

Recycle the output buffer.

()

Source from the content-addressed store, hash-verified

178 * Recycle the output buffer.
179 */
180 public void recycle() {
181
182 initial = true;
183 bytesWritten = 0;
184 charsWritten = 0;
185
186 if (bb.capacity() > 16 * defaultBufferSize) {
187 // Discard buffers which are too large
188 bb = ByteBuffer.allocate(defaultBufferSize);
189 }
190 clear(bb);
191 clear(cb);
192 closed = false;
193 suspended = false;
194 doFlush = false;
195
196 if (conv != null) {
197 conv.recycle();
198 conv = null;
199 }
200 }
201
202
203 /**

Callers

nothing calls this directly

Calls 3

clearMethod · 0.95
allocateMethod · 0.65
recycleMethod · 0.65

Tested by

no test coverage detected