public final void flush() throws IOException
    {
        if (! _closed)
        {
            if (atDatagramLevel() && ! hasAnnotations())
            {
                SymbolTable symtab = getSymbolTable();

                if (symtab != null &&
                    symtab.isReadOnly() &&
                    symtab.isLocalTable())
                {
                    // It's no longer possible to add more symbols to the local
                    // symtab, so we can safely write everything out.
                    writeAllBufferedData();
                }
            }

            _user_output_stream.flush();
        }
    }
public final void flush ( ) throws IOException { if ( ! _closed ) { if ( atDatagramLevel ( ) && ! hasAnnotations ( ) ) { SymbolTable symtab = getSymbolTable ( ) ; if ( symtab != null && symtab . isReadOnly ( ) && symtab . isLocalTable ( ) ) { writeAllBufferedData ( ) ; } } _user_output_stream . flush ( ) ; } }
{@inheritDoc}
<p>
The {@link OutputStream} spec is mum regarding the behavior of flush on
a closed stream, so we shouldn't assume that our stream can handle that.