code: public void setBufferSize(int size)
          throws IllegalStateException
      {
          if (size<=_bufferSize)
              return;
          
          if (_bufferedOut!=null && _bufferedOut.size()>0)
              throw new IllegalStateException("Not Reset");
  
          try
          {
              _bufferSize=size;
              if (_bufferedOut!=null)
              {
                  boolean fixed=_bufferedOut.isFixed();
                  _bufferedOut.setFixed(false);
                  _bufferedOut.ensureSize(size);
                  _bufferedOut.setFixed(fixed);
              }
              
          }
          catch (IOException e){log.warn(LogSupport.EXCEPTION,e);}
      }
docs: Set the output buffer size.
  Note that this is the minimal buffer size and that installed
  filters may perform their own buffering and are likely to change
  the size of the output. Also the pre and post reserve buffers may be
  allocated within the buffer for headers and chunking.
  @param size Minimum buffer size in bytes
  @exception IllegalStateException If output has been written.