if (format.getDefaultFileExtension() != null) {
filename += "." + format.getDefaultFileExtension();
}
response.setHeader("Content-Disposition", "attachment; filename=" + filename);
RDFWriter writer = Rio.createWriter(format, response.getOutputStream());
conn = repo.getConnection();
conn.exportStatements(settings.getSubject(), settings.getPredicate(), settings.getObject(),
settings.isIncludeInferred(), writer, settings.getContexts());
}