void blockForOutput() throws IOException { if (_generator._endp.isBlocking()) { try { flush(); } catch(IOException e) { _generator._endp.close(); throw e; } } else { if (!_generator._endp.blockWritable(_maxIdleTime)) { _generator._endp.close(); throw new EofException("timeout"); } _generator.flush(); } }