Class StandardStreamsHandler
java.lang.Object
org.junit.platform.console.command.StandardStreamsHandler
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private static booleanisSameFile(Path path1, Path path2) voidredirectStandardStreams(Path stdoutPath, Path stderrPath) Redirect standard output (stdout) and standard error (stderr) to the specified file paths.
-
Field Details
-
stdout
-
stderr
-
-
Constructor Details
-
StandardStreamsHandler
public StandardStreamsHandler()
-
-
Method Details
-
redirectStandardStreams
Redirect standard output (stdout) and standard error (stderr) to the specified file paths.If the paths are the same, both streams are redirected to the same file.
The default charset is used for writing to the files.
- Parameters:
stdoutPath- the file path for standard output, ornullto indicate no redirectionstderrPath- the file path for standard error, ornullto indicate no redirection
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
isSameFile
-