@Override
    public void run() {

        String script = "echo on\n" + m_script;
        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        PrintStream out = new PrintStream(buffer);
        final CmsShell shell = new CmsShell(getCms(), "${user}@${project}:${siteroot}|${uri}>", null, out, out);

        String[] subscripts = script.split("\n");
        int stringPos = 0;
        for (String subscript : subscripts) {
            shell.execute(subscript);
            out.flush();
            String res = buffer.toString();
            getReport().println(
                Messages.get().container(Messages.RPT_IMPORT_SCRIPT_OUTPUT_1, res.substring(stringPos)));
            stringPos = res.length();
        }
    }
@ Override public void run ( ) { String script = "echo on\n" + m_script ; ByteArrayOutputStream buffer = new ByteArrayOutputStream ( ) ; PrintStream out = new PrintStream ( buffer ) ; final CmsShell shell = new CmsShell ( getCms ( ) , "${user}@${project}:${siteroot}|${uri}>" , null , out , out ) ; String [ ] subscripts = script . split ( "\n" ) ; int stringPos = 0 ; for ( String subscript : subscripts ) { shell . execute ( subscript ) ; out . flush ( ) ; String res = buffer . toString ( ) ; getReport ( ) . println ( Messages . get ( ) . container ( Messages . RPT_IMPORT_SCRIPT_OUTPUT_1 , res . substring ( stringPos ) ) ) ; stringPos = res . length ( ) ; } }
@see java.lang.Thread#run()