Flush the output buffer to the underlying character stream, without flushing the stream itself. This method is non-private only so that it may be invoked by PrintStream. @throws IOException Error writing buffered data
()
| 95 | * @throws IOException Error writing buffered data |
| 96 | */ |
| 97 | protected final void flushBuffer() throws IOException { |
| 98 | if (bufferSize == 0) { |
| 99 | return; |
| 100 | } |
| 101 | flushed = true; |
| 102 | ensureOpen(); |
| 103 | if (nextChar == 0) { |
| 104 | return; |
| 105 | } |
| 106 | initOut(); |
| 107 | out.write(cb, 0, nextChar); |
| 108 | nextChar = 0; |
| 109 | } |
| 110 | |
| 111 | private void initOut() throws IOException { |
| 112 | if (out == null) { |
no test coverage detected