if (_buffer.length()!=0)
if (_buffer!=null && _buffer.length()!=0)
    public void setNeedMore(boolean needMore)    {        // TODO we really need _needMore and _expectMore.        // there is no guarantee we can send a packet here!        // we should just set needMore and expectMore to true.        // needMore is set false once preparePacket is able to append the        // MORE_CONTENT        // message to the buffer. exportMore is set false once data is returned.        // note this method should not set needMore true if expectMore is true.        // don't forget to delete this comment when you fix it :-)        _expectMore=needMore;        if (_buffer.length()!=0)            Log.warn("Ooops - may have partially flushed data!");                if (needMore)        {            Buffer needMoreBuff=_buffers.getBuffer(AJP13_MORE_CONTENT.length);            needMoreBuff.put(AJP13_MORE_CONTENT);            try            {                if (_endp.flush(needMoreBuff)!=AJP13_MORE_CONTENT.length)                    Log.warn("Ooops - may not have flushed all the data");            }            catch (IOException e)            {                e.printStackTrace();            }            _buffers.returnBuffer(needMoreBuff);        }    }