public class SysOutInterceptor extends PrintStream
| Modifier and Type | Class and Description |
|---|---|
static class |
SysOutInterceptor.LoggedResult<T>
The type Logged result.
|
| Modifier and Type | Field and Description |
|---|---|
static SysOutInterceptor |
INSTANCE
The constant INSTANCE.
|
static PrintStream |
ORIGINAL_OUT
The constant INSTANCE.
|
out| Modifier and Type | Method and Description |
|---|---|
PrintStream |
currentHandler()
Current handler printGroups stream.
|
PrintStream |
getInner()
Gets heapCopy.
|
SysOutInterceptor |
init()
Init sys out interceptor.
|
void |
print(String s) |
void |
println(String x) |
PrintStream |
setCurrentHandler(PrintStream out)
Sets current handler.
|
static SysOutInterceptor.LoggedResult<Void> |
withOutput(Runnable fn)
With output logged result.
|
static <T> SysOutInterceptor.LoggedResult<T> |
withOutput(UncheckedSupplier<T> fn)
With output logged result.
|
void |
write(byte[] b) |
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, writepublic static final PrintStream ORIGINAL_OUT
public static final SysOutInterceptor INSTANCE
public static SysOutInterceptor.LoggedResult<Void> withOutput(@Nonnull Runnable fn)
fn - the fnpublic static <T> SysOutInterceptor.LoggedResult<T> withOutput(@Nonnull UncheckedSupplier<T> fn)
T - the type parameterfn - the fn@Nonnull public SysOutInterceptor init()
public PrintStream currentHandler()
@Nonnull public PrintStream getInner()
public void print(String s)
print in class PrintStreampublic void write(byte[] b)
write in class FilterOutputStreampublic void println(String x)
println in class PrintStreampublic PrintStream setCurrentHandler(PrintStream out)
out - the outCopyright © 2019 SimiaCryptus Software. All rights reserved.