for(String s : commands) {
jobs.add(new MaudeJob(s));
charCounter += s.length();
}
}catch (Exception e) {
throw new ParseException(e);
}
else { //Code below is equivalent to jobs.add(new MaudeJob(IOUtils.toString(input)))
try {
InputStreamReader isr = new InputStreamReader(input);
StringWriter output = new StringWriter();
char[] buffer = new char[1024];
int n;
while (-1 != (n = isr.read(buffer)))
output.write(buffer, 0, n);
jobs.add(new MaudeJob(output.toString()));
} catch (Exception e) {
throw new ParseException(e);
}
}
return jobs;
}