messages = parseModernStream( new BufferedReader( new StringReader( stringWriter.toString() ) ) );
messages = parseModernStream( new BufferedReader( new StringReader( err.getOutput() ) ) );
    private List compileOutOfProcess( File workingDirectory, String executable, String[] args )        throws CompilerException    {        Commandline cli = new Commandline();        cli.setWorkingDirectory( workingDirectory.getAbsolutePath() );        cli.setExecutable( executable );        cli.addArguments( args );        Writer stringWriter = new StringWriter();        StreamConsumer out = new WriterStreamConsumer( stringWriter );        StreamConsumer err = new WriterStreamConsumer( stringWriter );        int returnCode;        List messages;        try        {            returnCode = CommandLineUtils.executeCommandLine( cli, out, err );            messages = parseModernStream( new BufferedReader( new StringReader( stringWriter.toString() ) ) );        }        catch ( CommandLineException e )        {            throw new CompilerException( "Error while executing the external compiler.", e );        }        catch ( IOException e )        {            throw new CompilerException( "Error while executing the external compiler.", e );        }        if ( returnCode != 0 && messages.isEmpty() )        {            // TODO: exception?            messages.add( new CompilerError( "Failure executing javac,  but could not parse the error:" +  EOL +                                             stringWriter.toString(), true ) );        }        return messages;    }