Class StandardStreamsHandler
- java.lang.Object
-
- org.junit.platform.console.command.StandardStreamsHandler
-
- All Implemented Interfaces:
java.lang.AutoCloseable
class StandardStreamsHandler extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description StandardStreamsHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()private static booleanisSameFile(java.nio.file.Path path1, java.nio.file.Path path2)voidredirectStandardStreams(java.nio.file.Path stdoutPath, java.nio.file.Path stderrPath)Redirect standard output (stdout) and standard error (stderr) to the specified file paths.
-
-
-
Method Detail
-
redirectStandardStreams
public void redirectStandardStreams(java.nio.file.Path stdoutPath, java.nio.file.Path stderrPath)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 interfacejava.lang.AutoCloseable
-
isSameFile
private static boolean isSameFile(java.nio.file.Path path1, java.nio.file.Path path2)
-
-