public abstract class GenericBinaryResponseWriter extends BaseResponseWriter implements BinaryQueryResponseWriter
QueryResponseWriter implementation that requires a user to
implement the
getSingleResponseWriter(OutputStream, SolrQueryRequest, SolrQueryResponse)
that defines a BaseResponseWriter.SingleResponseWriter to handle the binary output.BaseResponseWriter.DocListInfo, BaseResponseWriter.SingleResponseWriterCONTENT_TYPE_TEXT_ASCII, CONTENT_TYPE_TEXT_UTF8, CONTENT_TYPE_XML_UTF8| Constructor and Description |
|---|
GenericBinaryResponseWriter() |
| Modifier and Type | Method and Description |
|---|---|
abstract BaseResponseWriter.SingleResponseWriter |
getSingleResponseWriter(OutputStream out,
SolrQueryRequest request,
SolrQueryResponse response)
Users of this class should implement this method to define a
BaseResponseWriter.SingleResponseWriter responsible for writing the binary output
given a SolrDocumentList or doc-by-doc, given a
SolrInputDocument. |
void |
write(OutputStream out,
SolrQueryRequest request,
SolrQueryResponse response)
Writes the binary output data using the
BaseResponseWriter.SingleResponseWriter
provided by a call to
getSingleResponseWriter(OutputStream, SolrQueryRequest, SolrQueryResponse)
. |
void |
write(Writer writer,
SolrQueryRequest request,
SolrQueryResponse response)
Just to throw Exception So that the eimplementing classes do not have to do the same
|
init, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContentType, initpublic void write(OutputStream out, SolrQueryRequest request, SolrQueryResponse response) throws IOException
BaseResponseWriter.SingleResponseWriter
provided by a call to
getSingleResponseWriter(OutputStream, SolrQueryRequest, SolrQueryResponse)
.write in interface BinaryQueryResponseWriterout - The OutputStream to write the binary data to.request - The provided SolrQueryRequest.response - The provided SolrQueryResponse.IOExceptionpublic abstract BaseResponseWriter.SingleResponseWriter getSingleResponseWriter(OutputStream out, SolrQueryRequest request, SolrQueryResponse response)
BaseResponseWriter.SingleResponseWriter responsible for writing the binary output
given a SolrDocumentList or doc-by-doc, given a
SolrInputDocument.out - The OutputStream to write the binary data response to.request - The provided SolrQueryRequest.response - The provided SolrQueryResponse.BaseResponseWriter.SingleResponseWriter that will be used to generate the
response output from this QueryResponseWriter.public void write(Writer writer, SolrQueryRequest request, SolrQueryResponse response) throws IOException
write in interface QueryResponseWriterIOException