MCPcopy Index your code
hub / github.com/beanshell/beanshell / redirectOutputToFile

Method redirectOutputToFile

src/bsh/Interpreter.java:1057–1067  ·  view source on GitHub ↗
( String filename )

Source from the content-addressed store, hash-verified

1055 }
1056
1057 public static void redirectOutputToFile( String filename )
1058 {
1059 try {
1060 PrintStream pout = new PrintStream(
1061 new FileOutputStream( filename ) );
1062 System.setOut( pout );
1063 System.setErr( pout );
1064 } catch ( IOException e ) {
1065 System.err.println("Can't redirect output to file: "+filename );
1066 }
1067 }
1068
1069 /**
1070 Set an external class loader to be used as the base classloader

Callers 1

staticInitMethod · 0.95

Calls 3

printlnMethod · 0.65
setOutMethod · 0.45
setErrMethod · 0.45

Tested by

no test coverage detected