标签:iostream
-
在Java中,如何将System.out重定向为null,然后再次回到stdout? - java
我试图使用以下代码将System.out临时重定向到/ dev / null,但它不起作用。 System.out.println("this should go to stdout"); PrintStream original = System.out; System.setOut(new PrintStream(new FileOu […]
我试图使用以下代码将System.out临时重定向到/ dev / null,但它不起作用。 System.out.println("this should go to stdout"); PrintStream original = System.out; System.setOut(new PrintStream(new FileOu […]