/** * Executes the commands from the given input stream in this shell.<p> * * <ul> * <li>Commands in the must be separated with a line break '\n'. * <li>Only one command per line is allowed. * <li>String parameters must be quoted like this: <code>'string value'</code>. * </ul> * * @param inputStream the input stream from which the commands are read */ public void execute(InputStream inputStream) { execute(new InputStreamReader(inputStream)); }
/** * Executes the commands from the given string in this shell.<p> * * <ul> * <li>Commands in the must be separated with a line break '\n'. * <li>Only one command per line is allowed. * <li>String parameters must be quoted like this: <code>'string value'</code>. * </ul> * * @param commands the string from which the commands are read */ public void execute(String commands) { execute(new StringReader(commands)); }
/** * Reads the given stream and executes the commands in this shell.<p> * * @param inputStream an input stream from which commands are read * @deprecated use {@link #execute(InputStream)} instead */ @Deprecated public void start(FileInputStream inputStream) { // in the old behavior 'interactive' was always true setInteractive(true); execute(inputStream); }
System.err, interactive); shell.execute(stream); try { stream.close();
m_shell.execute( new FileInputStream( new File(m_updateBean.getWebAppRfsPath() + CmsUpdateBean.FOLDER_UPDATE + "cmsupdate.txt")));
m_shell.execute( new FileInputStream( new File(
PrintStream out = new PrintStream(buffer); CmsShell shell = new CmsShell(cms, "${user}@${project}:${siteroot}|${uri}>", null, out, out); shell.execute(importScript); String outputString = buffer.toString(); LOG.info("Shell output for import script was: \n" + outputString);