Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8081844

JShell API: JShell with Readers and Writers

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Rejected
    • Icon: P5 P5
    • tbd
    • 9
    • tools

      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

            rfield Robert Field (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: