public static InputStream getIn() { return getGlobal().getIn(); }
public static InputStream getIn() { return getGlobal().getIn(); }
public static InputStream getIn() { return getGlobal().getIn(); }
public ShellConsole getConsole(Charset cs) { if (!loadJLine(cs)) { console = ShellConsole.getConsole(getIn(), getErr(), cs); } return console; }
public ShellConsole getConsole(Charset cs) { if (!loadJLine(cs)) { console = ShellConsole.getConsole(getIn(), getErr(), cs); } return console; }
static void processFiles(Context cx, String[] files) throws IOException { StringBuffer cout = new StringBuffer(); if (files.length > 0) { for (int i=0; i < files.length; i++) { try { String source = (String)readFileOrUrl(files[i], true); cout.append(Compressor.compressScript(source, 0, 1, escapeUnicode, stripConsole)); } catch(IOException ex) { // continue processing files } } } else { byte[] data = Kit.readStream(global.getIn(), 4096); // Convert to String using the default encoding String source = new String(data); if (source != null) { cout.append(Compressor.compressScript(source, 0, 1, escapeUnicode, stripConsole)); } } global.getOut().println(cout); }
try in = new BufferedReader(new InputStreamReader(global.getIn(), charEnc));