/* ------------------------------------------------------------ */
public void flush() throws IOException
{
// block until everything is flushed
Buffer content = _generator._content;
Buffer buffer = _generator._buffer;
if (content!=null && content.length()>0 || buffer!=null && buffer.length()>0 || _generator.isBufferFull())
{
_generator.flush();
while ((content!=null && content.length()>0 ||buffer!=null && buffer.length()>0) && _generator._endp.isOpen())
blockForOutput();
}
}