if (resultSequence.isEmpty()) {
throw new BadRequestException("No topic was found.");
}
response.setStatusCode(200);
response.setContentType(Atom.MIME_TYPE + "; charset=" + charset);
final Serializer serializer = broker.getSerializer();
serializer.reset();
try {
final Writer w = new OutputStreamWriter(
response.getOutputStream(), charset);
final SAXSerializer sax = (SAXSerializer) SerializerPool
.getInstance().borrowObject(SAXSerializer.class);
final Properties outputProperties = new Properties();
sax.setOutput(w, outputProperties);
serializer.setProperties(outputProperties);
serializer.setSAXHandlers(sax, sax);
serializer.toSAX(resultSequence, 1, 1, false, false);
SerializerPool.getInstance().returnObject(sax);
w.flush();
w.close();
} catch (final IOException ex) {