public class BinaryResponseWriter implements BinaryQueryResponseWriter {
public void write(OutputStream out, SolrQueryRequest req, SolrQueryResponse response) throws IOException {
Resolver resolver = new Resolver(req, response.getReturnFields());
NamedListCodec codec = new NamedListCodec(resolver);
codec.marshal(response.getValues(), out);
}
public void write(Writer writer, SolrQueryRequest request, SolrQueryResponse response) throws IOException {
throw new RuntimeException("This is a binary writer , Cannot write to a characterstream");
}