This class provides replacement values for the
System.in
,
System.out
, and
System.err
streams at run time. We want a fresh set of objects, so that any buffers
filled during image generation, as well as any redirection of the streams to new values, do not
change the behavior at run time.
By default, the streams are replaced to new streams that write to the standard file descriptors.
This can be customized by calling
SystemInOutErrSupport.setIn(java.io.InputStream)
,
SystemInOutErrSupport.setOut(java.io.PrintStream)
, and
SystemInOutErrSupport.setErr(java.io.PrintStream)
before the
static analysis starts, i.e., in a
Feature.beforeAnalysis(org.graalvm.nativeimage.hosted.Feature.BeforeAnalysisAccess)
method.