Use this method to revert System.out to the original output stream.
()
| 112 | * to the original output stream. |
| 113 | */ |
| 114 | public static void revertSystemOut() { |
| 115 | if (originalSystemOut != null && temporarySystemOut != null) { |
| 116 | temporarySystemOut.flush(); |
| 117 | temporarySystemOut.close(); |
| 118 | System.setOut(originalSystemOut); |
| 119 | originalSystemOut = null; |
| 120 | temporarySystemOut = null; |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Use this method to revert<code>System.err</code> |
no test coverage detected