+ Collection<RemoteFile> files = slivkaJob.getResults();
+ for (RemoteFile f : files)
+ {
+ if (f.getLabel().equals("log"))
+ {
+ ByteArrayOutputStream stream = new ByteArrayOutputStream();
+ f.writeTo(stream);
+ job.setLog(stream.toString("UTF-8"));
+ }
+ else if (f.getLabel().equals("error-log"))
+ {
+ ByteArrayOutputStream stream = new ByteArrayOutputStream();
+ f.writeTo(stream);
+ job.setErrorLog(stream.toString("UTF-8"));
+ }
+ }