@Override protected Output getDefaultOutput(PrintWriter out, OutputStream outputstream, String sep) { // Most exporters need direct access to these. this.os = outputstream; this.pw = out; output = new StreamedOutput(out, new PlainFormatter(), sep); if (isUncompressed()) { ResponseUtil.setCustomTypeHeader(response, getDefaultFileName(), getContentType()); } return output; }
@Override protected Output makeXMLOutput(PrintWriter out, String separator) { ResponseUtil.setXMLHeader(response, "uploaded-queries.xml"); try { return new StreamedOutput(out, new XMLFormatter(out), separator); } catch (XMLStreamException e) { throw new ServiceException(e); } catch (FactoryConfigurationError e) { throw new ServiceException(e); } }