public class JZtxtcmdUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.io.ByteArrayOutputStream |
consoleOut |
protected static JZtxtcmdUtil |
singleton |
protected java.io.PrintStream |
systemErrOld |
protected java.io.PrintStream |
systemOutOld |
| Constructor and Description |
|---|
JZtxtcmdUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
nonRedirectOutErr()
annulling a redirection of System.out and the System.err.
|
static java.lang.CharSequence |
oneLine(java.lang.CharSequence text,
java.lang.String replaceLinefeed) |
static java.lang.String |
out()
Gets the outputted String and clear the buffer of a redirected System output.
|
static void |
redirectOutErr()
Redirects the System.out and the System.err to write into an internal buffer.
|
protected static JZtxtcmdUtil singleton
protected java.io.PrintStream systemOutOld
protected java.io.PrintStream systemErrOld
protected java.io.ByteArrayOutputStream consoleOut
public static java.lang.CharSequence oneLine(java.lang.CharSequence text,
java.lang.String replaceLinefeed)
public static void redirectOutErr()
#systemOut() and
Use #unRedirectOutErr() to switch off this method.
If the output is redirected already, this method was called twice, it has no additional effect.public static void nonRedirectOutErr()
public static java.lang.String out()
redirectOutErr()