}
// Javadoc inherited.
public OutputBuffer getCurrentOutputBuffer() {
OutputBuffer currentOutputBuffer;
OutputBuffer topOutputBuffer;
if (outputBufferStack == null || outputBufferStack.isEmpty()) {
topOutputBuffer = null;
currentOutputBuffer = null;
} else {
topOutputBuffer = (OutputBuffer) outputBufferStack.peek();
// The OutputBuffer on the stack could be a simple one, or a
// compound one. If it is a compound one then we need to return
// its current buffer.
currentOutputBuffer = topOutputBuffer.getCurrentBuffer();
}
if (logger.isDebugEnabled()) {
if (currentOutputBuffer == topOutputBuffer) {
logger.debug(