public static class SmileResponseWriter.SmileWriter extends TextResponseWriter
| Modifier and Type | Field and Description |
|---|---|
protected com.fasterxml.jackson.dataformat.smile.SmileGenerator |
gen |
protected OutputStream |
out |
cal, doIndent, level, req, returnFields, rsp, schema, writer| Constructor and Description |
|---|
SmileWriter(OutputStream out,
SolrQueryRequest req,
SolrQueryResponse rsp) |
| Modifier and Type | Method and Description |
|---|---|
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 |
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
|
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(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) |
close, getWriter, setIndent, writeArray, writeDate, writeDocuments, writeDouble, writeSolrDocumentList, writeTupleStream, writeValprotected final com.fasterxml.jackson.dataformat.smile.SmileGenerator gen
protected final OutputStream out
public SmileWriter(OutputStream out, SolrQueryRequest req, SolrQueryResponse rsp)
public void writeResponse()
throws IOException
IOExceptionprotected void writeNumber(String name, Number val) throws IOException
writeNumber in class TextResponseWriterIOExceptionpublic void writeBool(String name, Boolean val) throws IOException
writeBool in class TextResponseWriterIOExceptionpublic void writeNull(String name) throws IOException
IOExceptionpublic void writeStr(String name, String val, boolean needsEscaping) throws IOException
IOExceptionpublic void writeLong(String name, long val) throws IOException
writeLong in class TextResponseWriterIOExceptionpublic void writeInt(String name, int val) throws IOException
writeInt in class TextResponseWriterIOExceptionpublic void writeBool(String name, boolean val) throws IOException
writeBool in class TextResponseWriterIOExceptionpublic void writeFloat(String name, float val) throws IOException
writeFloat in class TextResponseWriterIOExceptionpublic void writeArrayCloser()
throws IOException
IOExceptionpublic void writeArraySeparator()
throws IOException
IOExceptionpublic void writeArrayOpener(int size)
throws IOException,
IllegalArgumentException
IOExceptionIllegalArgumentExceptionpublic void writeMapCloser()
throws IOException
IOExceptionpublic void writeMapSeparator()
throws IOException
IOExceptionpublic void writeMapOpener(int size)
throws IOException,
IllegalArgumentException
IOExceptionIllegalArgumentExceptionprotected void writeKey(String fname, boolean needsEscaping) throws IOException
IOExceptionpublic void writeByteArr(String name, byte[] buf, int offset, int len) throws IOException
writeByteArr in class TextResponseWriterIOExceptionpublic void setLevel(int level)
setLevel in class TextResponseWriterpublic int level()
level in class TextResponseWriterpublic void indent()
throws IOException
indent in class TextResponseWriterIOExceptionpublic void indent(int lev)
throws IOException
indent in class TextResponseWriterIOExceptionpublic int incLevel()
incLevel in class TextResponseWriterpublic int decLevel()
decLevel in class TextResponseWriterprotected void writeNamedListAsMapMangled(String name, NamedList val) throws IOException
IOExceptionprotected void writeNamedListAsMapWithDups(String name, NamedList val) throws IOException
IOExceptionprotected void writeNamedListAsArrMap(String name, NamedList val) throws IOException
IOExceptionprotected void writeNamedListAsArrArr(String name, NamedList val) throws IOException
IOExceptionprotected void writeNamedListAsFlat(String name, NamedList val) throws IOException
IOExceptionpublic void writeNamedList(String name, NamedList val) throws IOException
writeNamedList in class TextResponseWriterIOExceptionpublic void writeSolrDocument(String name, SolrDocument doc, ReturnFields returnFields, int idx) throws IOException
writeSolrDocument in class TextResponseWriterIOExceptionpublic void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore) throws IOException
writeStartDocumentList in class TextResponseWriterIOExceptionpublic void writeEndDocumentList()
throws IOException
writeEndDocumentList in class TextResponseWriterIOExceptionpublic void writeMap(String name, Map val, boolean excludeOuter, boolean isFirstVal) throws IOException
writeMap in class TextResponseWriterIOExceptionpublic void writeArray(String name, Iterator val) throws IOException
writeArray in class TextResponseWriterIOExceptionpublic void writeInt(String name, String val) throws IOException
TextResponseWriterwriteInt in class TextResponseWriterIOExceptionpublic void writeLong(String name, String val) throws IOException
TextResponseWriterwriteLong in class TextResponseWriterIOExceptionpublic void writeBool(String name, String val) throws IOException
TextResponseWriterwriteBool in class TextResponseWriterIOExceptionpublic void writeFloat(String name, String val) throws IOException
TextResponseWriterwriteFloat in class TextResponseWriterIOExceptionpublic void writeDouble(String name, String val) throws IOException
TextResponseWriterwriteDouble in class TextResponseWriterIOExceptionpublic void writeDate(String name, String val) throws IOException
TextResponseWriterwriteDate in class TextResponseWriterIOExceptionprotected static void unicodeEscape(Appendable out, int ch) throws IOException
IOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.