}
String email = parts[0];
String filename = parts[1];
try {
final OfflineDownloadResponse response = downloadResponseFetcher
.fetch(email, filename);
return Response
.ok(new StreamingOutput() {
@Override
public void write(OutputStream output)
throws IOException, WebApplicationException {
IOUtils.copy(response.getBlob().openInputStream(),
output);
}
})
.header("Content-Disposition",
"attachment; filename=" + filename).build();