Package org.apache.solr.response
Interface TextQueryResponseWriter
- All Superinterfaces:
NamedListInitializedPlugin,QueryResponseWriter
- All Known Implementing Classes:
CSVResponseWriter,GeoJSONResponseWriter,GraphMLResponseWriter,JacksonJsonWriter,JSONResponseWriter,SchemaXmlResponseWriter,XMLResponseWriter
A writer supporting character streams (
Writer based).-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDelegates write methods to an underlyingOutputStream, but does not delegateOutputStream.flush(), (norOutputStream.close()). -
Field Summary
Fields inherited from interface org.apache.solr.response.QueryResponseWriter
CONTENT_TYPE_TEXT_UTF8, CONTENT_TYPE_XML_UTF8 -
Method Summary
Modifier and TypeMethodDescriptiondefault voidwrite(OutputStream outputStream, SolrQueryRequest request, SolrQueryResponse response, String contentType) Writes the response to theOutputStream.voidwrite(Writer writer, SolrQueryRequest request, SolrQueryResponse response) Write a SolrQueryResponse in a textual manner.default StringwriteToString(SolrQueryRequest request, SolrQueryResponse response) Writes a String for debugging / testing purposes.Methods inherited from interface org.apache.solr.util.plugin.NamedListInitializedPlugin
initMethods inherited from interface org.apache.solr.response.QueryResponseWriter
getContentType, write
-
Method Details
-
write
Write a SolrQueryResponse in a textual manner.Information about the request (in particular: formatting options) may be obtained from
reqbut the dominant source of information should bersp.There are no mandatory actions that write must perform. An empty write implementation would fulfill all interface obligations.
- Throws:
IOException
-
writeToString
default String writeToString(SolrQueryRequest request, SolrQueryResponse response) throws IOException Description copied from interface:QueryResponseWriterWrites a String for debugging / testing purposes.- Specified by:
writeToStringin interfaceQueryResponseWriter- Throws:
IOException
-
write
default void write(OutputStream outputStream, SolrQueryRequest request, SolrQueryResponse response, String contentType) throws IOException Description copied from interface:QueryResponseWriterWrites the response to theOutputStream.contentTypeis fromQueryResponseWriter.getContentType(SolrQueryRequest, SolrQueryResponse), and it's often ignored.- Specified by:
writein interfaceQueryResponseWriter- Throws:
IOException
-