Closes this print stream. Flushes this stream and then closes the target stream. If an I/O error occurs, this stream's error state is set to true.
()
| 242 | * {@code true}. |
| 243 | */ |
| 244 | @Override |
| 245 | public synchronized void close() { |
| 246 | flush(); |
| 247 | if (out != null) { |
| 248 | try { |
| 249 | out.close(); |
| 250 | out = null; |
| 251 | } catch (IOException e) { |
| 252 | setError(); |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Ensures that all pending data is sent out to the target stream. It also |