-
Enhancement
-
Resolution: Rejected
-
P5
-
9
JShell has the following method:
/**
* Create a evaluation processing environment from which the state engine
* and analysis support can be accessed.
*
* @param in Input for the running evaluation (it's System.in).
* @param out Output for the running evaluation (it's System.out).
* @param err Error output for the running evaluation (it's System.err).
* @return the entry point into evaluation processing support.
*/
public static JShell create(InputStream in, PrintStream out, PrintStream err) {
return new JShellImpl(in, out, err);
}
but while InputStream and PrintStream are convenient for hooking up to a Unix-like terminal window, for embedded use, it would be more convenient if it also had a method that took Readers and Writers, and so avoid the round trip from characters to bytes and back again.
-- Jon
/**
* Create a evaluation processing environment from which the state engine
* and analysis support can be accessed.
*
* @param in Input for the running evaluation (it's System.in).
* @param out Output for the running evaluation (it's System.out).
* @param err Error output for the running evaluation (it's System.err).
* @return the entry point into evaluation processing support.
*/
public static JShell create(InputStream in, PrintStream out, PrintStream err) {
return new JShellImpl(in, out, err);
}
but while InputStream and PrintStream are convenient for hooking up to a Unix-like terminal window, for embedded use, it would be more convenient if it also had a method that took Readers and Writers, and so avoid the round trip from characters to bytes and back again.
-- Jon