} catch (ItemNotFound itemNotFound) {
throw new NotFoundFormattedException("Job with id '" + jobId + "' not found", null);
}
String filePath = job.getStatusDir() + "/" + fileName;
LOG.debug("Reading file " + filePath);
FilePaginator paginator = new FilePaginator(filePath, context);
if (page == null)
page = 0L;
FileResource file = new FileResource();
file.setFilePath(filePath);
file.setFileContent(paginator.readPage(page));
file.setHasNext(paginator.pageCount() > page + 1);
file.setPage(page);
file.setPageCount(paginator.pageCount());
JSONObject object = new JSONObject();
object.put("file", file);
return Response.ok(object).status(200).build();
} catch (WebApplicationException ex) {