public class SystemStreamUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getSystemErr()
Returns buffer accumulated with data as string.
|
static String |
getSystemOut()
Returns buffer accumulated with data as string.
|
static void |
replaceError()
Replaces
System.err with internal buffer. |
static void |
replaceOut()
Replaces
System.out with internal buffer. |
static void |
restoreSystemErr()
Restores
System.err to former glory. |
static void |
restoreSystemOut()
Restores
System.out to former glory. |
public static void replaceOut()
System.out
with internal buffer. All calls such as System.out.print...
will go to this buffer and not to STDIOpublic static String getSystemOut()
public static void restoreSystemOut()
System.out
to former glory.public static void replaceError()
System.err
with internal buffer. All calls such as System.err.print...
will go to this buffer and not to STDERRpublic static String getSystemErr()
public static void restoreSystemErr()
System.err
to former glory.Copyright © 2020 JavaLite. All rights reserved.