/** * Changes STDIN and $stdin to a given input stream. The default standard input * is java.lang.System.in. * Call this method before you use put/get, runScriptlet, and parse methods so that * the given input stream will be used. * * @since JRuby 1.5.0. * * @param istream an input stream to be set */ public void setInput(InputStream istream) { provider.getRubyInstanceConfig().setInput(istream); }
/** * Changes STDIN and $stdin to a given input stream. The default standard input * is java.lang.System.in. * Call this method before you use put/get, runScriptlet, and parse methods so that * the given input stream will be used. * * @since JRuby 1.5.0. * * @param istream an input stream to be set */ public void setInput(InputStream istream) { provider.getRubyInstanceConfig().setInput(istream); }
/** * Changes STDIN and $stdin to a given input stream. The default standard input * is java.lang.System.in. * Call this method before you use put/get, runScriptlet, and parse methods so that * the given input stream will be used. * * @since JRuby 1.5.0. * * @param istream an input stream to be set */ public void setInput(InputStream istream) { provider.getRubyInstanceConfig().setInput(istream); }
/** * Changes STDIN and $stdin to a given input stream. The default standard input * is java.lang.System.in. * Call this method before you use put/get, runScriptlet, and parse methods so that * the given input stream will be used. * * @since JRuby 1.5.0. * * @param istream an input stream to be set */ public void setInput(InputStream istream) { provider.getRubyInstanceConfig().setInput(istream); }
/** * Changes STDIN and $stdin to a given reader. No reader is set by default. * Call this method before you use put/get, runScriptlet, and parse methods so that * the given reader will be used. * * @since JRuby 1.5.0. * * @param reader a reader to be set */ public void setInput(Reader reader) { if (reader == null) { provider.getRubyInstanceConfig().setInput(null); } else { ReaderInputStream istream = new ReaderInputStream(reader); provider.getRubyInstanceConfig().setInput(istream); } }
/** * Changes STDIN and $stdin to a given reader. No reader is set by default. * Call this method before you use put/get, runScriptlet, and parse methods so that * the given reader will be used. * * @since JRuby 1.5.0. * * @param reader a reader to be set */ public void setInput(Reader reader) { if (reader == null) { provider.getRubyInstanceConfig().setInput(null); } else { ReaderInputStream istream = new ReaderInputStream(reader); provider.getRubyInstanceConfig().setInput(istream); } }
/** * Changes STDIN and $stdin to a given reader. No reader is set by default. * Call this method before you use put/get, runScriptlet, and parse methods so that * the given reader will be used. * * @since JRuby 1.5.0. * * @param reader a reader to be set */ public void setInput(Reader reader) { if (reader == null) { provider.getRubyInstanceConfig().setInput(null); } else { ReaderInputStream istream = new ReaderInputStream(reader); provider.getRubyInstanceConfig().setInput(istream); } }
public RubyInstanceConfig(final InputStream in, final PrintStream out, final PrintStream err) { this(); setInput(in); setOutput(out); setError(err); }
/** * Changes STDIN and $stdin to a given reader. No reader is set by default. * Call this method before you use put/get, runScriptlet, and parse methods so that * the given reader will be used. * * @since JRuby 1.5.0. * * @param reader a reader to be set */ public void setInput(Reader reader) { if (reader == null) { provider.getRubyInstanceConfig().setInput(null); } else { ReaderInputStream istream = new ReaderInputStream(reader); provider.getRubyInstanceConfig().setInput(istream); } }
public RubyInstanceConfig(final InputStream in, final PrintStream out, final PrintStream err) { this(); setInput(in); setOutput(out); setError(err); }
public RubyInstanceConfig(final InputStream in, final PrintStream out, final PrintStream err) { this(); setInput(in); setOutput(out); setError(err); }
public RubyInstanceConfig(final InputStream in, final PrintStream out, final PrintStream err) { this(); setInput(in); setOutput(out); setError(err); }
public void start() throws IOException { config = new RubyInstanceConfig(parentRuntime.getInstanceConfig()); config.setCurrentDirectory(pwd.toString()); config.setEnvironment(environmentMap(env)); if (pipedStreams) { config.setInput(new PipedInputStream(processInput)); config.setOutput(new PrintStream(new PipedOutputStream(processOutput))); config.setError(new PrintStream(new PipedOutputStream(processError))); } String procName = "piped"; if (argArray.length > 0) { procName = argArray[0]; } processThread = new Thread(this, "ScriptThreadProcess: " + procName); processThread.setDaemon(true); processThread.start(); }
public void start() throws IOException { config = new RubyInstanceConfig(parentRuntime.getInstanceConfig()); config.setEnvironment(environmentMap(env)); config.setCurrentDirectory(pwd.toString()); if (pipedStreams) { config.setInput(new PipedInputStream(processInput)); config.setOutput(new PrintStream(new PipedOutputStream(processOutput))); config.setError(new PrintStream(new PipedOutputStream(processError))); } String procName = "piped"; if (argArray.length > 0) { procName = argArray[0]; } processThread = new Thread(this, "ScriptThreadProcess: " + procName); processThread.setDaemon(true); processThread.start(); }
public void start() throws IOException { config = new RubyInstanceConfig(parentRuntime.getInstanceConfig()); config.setEnvironment(environmentMap(env)); config.setCurrentDirectory(pwd.toString()); if (pipedStreams) { config.setInput(new PipedInputStream(processInput)); config.setOutput(new PrintStream(new PipedOutputStream(processOutput))); config.setError(new PrintStream(new PipedOutputStream(processError))); } String procName = "piped"; if (argArray.length > 0) { procName = argArray[0]; } processThread = new Thread(this, "ScriptThreadProcess: " + procName); processThread.setDaemon(true); processThread.start(); }
public void start() throws IOException { config = new RubyInstanceConfig(parentRuntime.getInstanceConfig()); config.setCurrentDirectory(pwd.toString()); config.setEnvironment(environmentMap(env)); if (pipedStreams) { config.setInput(new PipedInputStream(processInput)); config.setOutput(new PrintStream(new PipedOutputStream(processOutput))); config.setError(new PrintStream(new PipedOutputStream(processError))); } String procName = "piped"; if (argArray.length > 0) { procName = argArray[0]; } processThread = new Thread(this, "ScriptThreadProcess: " + procName); processThread.setDaemon(true); processThread.start(); }
/** * Returns a new instance of the JRuby runtime configured with the given * input, output and error streams and otherwise default configuration * (except where specified system properties alter defaults). * * @param in the custom input stream * @param out the custom output stream * @param err the custom error stream * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance(InputStream in, PrintStream out, PrintStream err) { RubyInstanceConfig config = new RubyInstanceConfig(); config.setInput(in); config.setOutput(out); config.setError(err); return newInstance(config); }
/** * Returns a new instance of the JRuby runtime configured with the given * input, output and error streams and otherwise default configuration * (except where specified system properties alter defaults). * * @param in the custom input stream * @param out the custom output stream * @param err the custom error stream * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance(InputStream in, PrintStream out, PrintStream err) { RubyInstanceConfig config = new RubyInstanceConfig(); config.setInput(in); config.setOutput(out); config.setError(err); return newInstance(config); }
/** * Returns a new instance of the JRuby runtime configured with the given * input, output and error streams and otherwise default configuration * (except where specified system properties alter defaults). * * @param in the custom input stream * @param out the custom output stream * @param err the custom error stream * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance(InputStream in, PrintStream out, PrintStream err) { RubyInstanceConfig config = new RubyInstanceConfig(); config.setInput(in); config.setOutput(out); config.setError(err); return newInstance(config); }
/** * Returns a new instance of the JRuby runtime configured with the given * input, output and error streams and otherwise default configuration * (except where specified system properties alter defaults). * * @param in the custom input stream * @param out the custom output stream * @param err the custom error stream * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance(InputStream in, PrintStream out, PrintStream err) { RubyInstanceConfig config = new RubyInstanceConfig(); config.setInput(in); config.setOutput(out); config.setError(err); return newInstance(config); }