Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.18 KB | None | 0 0
  1. PrintStream sysOut;
  2. final ByteArrayOutputStream outContent = new ByteArrayOutputStream();
  3. sysOut = System.out;
  4. System.setOut(new PrintStream(outContent));
  5.  
  6. System.setOut(sysOut);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement