public static class SmileResponseWriter.SmileWriter extends TextResponseWriter
Modifier and Type | Field and Description |
---|---|
protected com.fasterxml.jackson.dataformat.smile.SmileGenerator |
gen |
protected String |
namedListStyle |
protected OutputStream |
out |
protected String |
wrapperFunction |
cal, doIndent, level, req, returnFields, rsp, schema, writer
Constructor and Description |
---|
SmileWriter(OutputStream out,
SolrQueryRequest req,
SolrQueryResponse rsp) |
Modifier and Type | Method and Description |
---|---|
void |
close()
done with this ResponseWriter...
|
int |
decLevel() |
int |
incLevel() |
void |
indent() |
void |
indent(int lev) |
int |
level() |
void |
setLevel(int level) |
protected static void |
unicodeEscape(Appendable out,
int ch) |
void |
writeArray(String name,
Iterator val) |
void |
writeArray(String name,
List l) |
void |
writeArrayCloser() |
void |
writeArrayOpener(int size) |
void |
writeArraySeparator() |
void |
writeBool(String name,
boolean val) |
void |
writeBool(String name,
Boolean val) |
void |
writeBool(String name,
String val)
if this form of the method is called, val is the Java string form of a boolean
|
void |
writeByteArr(String name,
byte[] buf,
int offset,
int len) |
void |
writeDate(String name,
String val)
if this form of the method is called, val is the Solr ISO8601 based date format
|
void |
writeDouble(String name,
String val)
if this form of the method is called, val is the Java string form of a double
|
void |
writeEndDocumentList() |
void |
writeFloat(String name,
float val) |
void |
writeFloat(String name,
String val)
if this form of the method is called, val is the Java string form of a float
|
void |
writeInt(String name,
int val) |
void |
writeInt(String name,
String val)
if this form of the method is called, val is the Java string form of an int
|
void |
writeIterator(IteratorWriter val) |
protected void |
writeKey(String fname,
boolean needsEscaping) |
void |
writeLong(String name,
long val) |
void |
writeLong(String name,
String val)
if this form of the method is called, val is the Java string form of a long
|
void |
writeMap(MapWriter val) |
void |
writeMap(String name,
Map val,
boolean excludeOuter,
boolean isFirstVal) |
void |
writeMapCloser() |
void |
writeMapOpener(int size) |
void |
writeMapSeparator() |
void |
writeNamedList(String name,
NamedList val) |
protected void |
writeNamedListAsArrArr(String name,
NamedList val) |
protected void |
writeNamedListAsArrMap(String name,
NamedList val) |
protected void |
writeNamedListAsFlat(String name,
NamedList val) |
protected void |
writeNamedListAsMapMangled(String name,
NamedList val)
Represents a NamedList directly as a JSON Object (essentially a Map)
Map null to "" and name mangle any repeated keys to avoid repeats in the
output.
|
protected void |
writeNamedListAsMapWithDups(String name,
NamedList val)
Represents a NamedList directly as a JSON Object (essentially a Map)
repeating any keys if they are repeated in the NamedList.
|
void |
writeNull(String name) |
protected void |
writeNumber(String name,
Number val) |
void |
writeResponse() |
void |
writeSolrDocument(String name,
SolrDocument doc,
ReturnFields returnFields,
int idx) |
void |
writeStartDocumentList(String name,
long start,
int size,
long numFound,
Float maxScore) |
void |
writeStr(String name,
String val,
boolean needsEscaping) |
getWriter, setIndent, writeArray, writeDate, writeDocuments, writeDouble, writeSolrDocumentList, writeVal
protected final com.fasterxml.jackson.dataformat.smile.SmileGenerator gen
protected final OutputStream out
protected String wrapperFunction
protected final String namedListStyle
public SmileWriter(OutputStream out, SolrQueryRequest req, SolrQueryResponse rsp)
public void writeResponse() throws IOException
IOException
protected void writeNumber(String name, Number val) throws IOException
writeNumber
in class TextResponseWriter
IOException
public void writeBool(String name, Boolean val) throws IOException
writeBool
in class TextResponseWriter
IOException
public void writeNull(String name) throws IOException
IOException
public void writeStr(String name, String val, boolean needsEscaping) throws IOException
IOException
public void writeLong(String name, long val) throws IOException
writeLong
in class TextResponseWriter
IOException
public void writeInt(String name, int val) throws IOException
writeInt
in class TextResponseWriter
IOException
public void writeBool(String name, boolean val) throws IOException
writeBool
in class TextResponseWriter
IOException
public void writeFloat(String name, float val) throws IOException
writeFloat
in class TextResponseWriter
IOException
public void writeArrayCloser() throws IOException
IOException
public void writeArraySeparator() throws IOException
IOException
public void writeArrayOpener(int size) throws IOException, IllegalArgumentException
IOException
IllegalArgumentException
public void writeMapCloser() throws IOException
IOException
public void writeMapSeparator() throws IOException
IOException
public void writeMapOpener(int size) throws IOException, IllegalArgumentException
IOException
IllegalArgumentException
protected void writeKey(String fname, boolean needsEscaping) throws IOException
IOException
public void writeByteArr(String name, byte[] buf, int offset, int len) throws IOException
writeByteArr
in class TextResponseWriter
IOException
public void setLevel(int level)
setLevel
in class TextResponseWriter
public int level()
level
in class TextResponseWriter
public void indent() throws IOException
indent
in class TextResponseWriter
IOException
public void indent(int lev) throws IOException
indent
in class TextResponseWriter
IOException
public int incLevel()
incLevel
in class TextResponseWriter
public int decLevel()
decLevel
in class TextResponseWriter
public void close() throws IOException
TextResponseWriter
close
in interface Closeable
close
in interface AutoCloseable
close
in class TextResponseWriter
IOException
protected void writeNamedListAsMapMangled(String name, NamedList val) throws IOException
IOException
protected void writeNamedListAsMapWithDups(String name, NamedList val) throws IOException
IOException
protected void writeNamedListAsArrMap(String name, NamedList val) throws IOException
IOException
protected void writeNamedListAsArrArr(String name, NamedList val) throws IOException
IOException
protected void writeNamedListAsFlat(String name, NamedList val) throws IOException
IOException
public void writeNamedList(String name, NamedList val) throws IOException
writeNamedList
in class TextResponseWriter
IOException
public void writeSolrDocument(String name, SolrDocument doc, ReturnFields returnFields, int idx) throws IOException
writeSolrDocument
in class TextResponseWriter
IOException
public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore) throws IOException
writeStartDocumentList
in class TextResponseWriter
IOException
public void writeEndDocumentList() throws IOException
writeEndDocumentList
in class TextResponseWriter
IOException
public void writeIterator(IteratorWriter val) throws IOException
writeIterator
in interface PushWriter
writeIterator
in class TextResponseWriter
IOException
public void writeMap(MapWriter val) throws IOException
writeMap
in interface PushWriter
writeMap
in class TextResponseWriter
IOException
public void writeMap(String name, Map val, boolean excludeOuter, boolean isFirstVal) throws IOException
writeMap
in class TextResponseWriter
IOException
public void writeArray(String name, List l) throws IOException
writeArray
in class TextResponseWriter
IOException
public void writeArray(String name, Iterator val) throws IOException
writeArray
in class TextResponseWriter
IOException
public void writeInt(String name, String val) throws IOException
TextResponseWriter
writeInt
in class TextResponseWriter
IOException
public void writeLong(String name, String val) throws IOException
TextResponseWriter
writeLong
in class TextResponseWriter
IOException
public void writeBool(String name, String val) throws IOException
TextResponseWriter
writeBool
in class TextResponseWriter
IOException
public void writeFloat(String name, String val) throws IOException
TextResponseWriter
writeFloat
in class TextResponseWriter
IOException
public void writeDouble(String name, String val) throws IOException
TextResponseWriter
writeDouble
in class TextResponseWriter
IOException
public void writeDate(String name, String val) throws IOException
TextResponseWriter
writeDate
in class TextResponseWriter
IOException
protected static void unicodeEscape(Appendable out, int ch) throws IOException
IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.