Package org.apache.solr.response
Class SmileResponseWriter.SmileWriter
- java.lang.Object
-
- org.apache.solr.response.TextResponseWriter
-
- org.apache.solr.response.JSONWriter
-
- org.apache.solr.response.SmileResponseWriter.SmileWriter
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,PushWriter
,JsonTextWriter
,TextWriter
- Enclosing class:
- SmileResponseWriter
public static class SmileResponseWriter.SmileWriter extends JSONWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected com.fasterxml.jackson.dataformat.smile.SmileGenerator
gen
protected OutputStream
out
-
Fields inherited from class org.apache.solr.response.JSONWriter
namedListStyle, wrapperFunction
-
Fields inherited from class org.apache.solr.response.TextResponseWriter
cal, doIndent, level, req, returnFields, rsp, schema, writer
-
Fields inherited from interface org.apache.solr.common.util.JsonTextWriter
hexdigits, JSON_NL_ARROFARR, JSON_NL_ARROFMAP, JSON_NL_ARROFNTV, JSON_NL_FLAT, JSON_NL_MAP, JSON_NL_STYLE
-
-
Constructor Summary
Constructors Constructor Description SmileWriter(OutputStream out, SolrQueryRequest req, SolrQueryResponse rsp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
done with this ResponseWriter...int
decLevel()
int
incLevel()
void
indent()
void
indent(int lev)
int
level()
void
setLevel(int level)
void
writeArrayCloser()
void
writeArrayOpener(int size)
void
writeArraySeparator()
void
writeBool(String name, boolean val)
void
writeBool(String name, Boolean val)
void
writeByteArr(String name, byte[] buf, int offset, int len)
void
writeFloat(String name, float val)
void
writeInt(String name, int val)
void
writeKey(String fname, boolean needsEscaping)
void
writeLong(String name, long val)
void
writeMapCloser()
void
writeMapOpener(int size)
void
writeMapSeparator()
void
writeNull(String name)
void
writeNumber(String name, Number val)
void
writeResponse()
void
writeStr(String name, String val, boolean needsEscaping)
-
Methods inherited from class org.apache.solr.response.JSONWriter
_writeChar, _writeStr, getNamedListStyle, headerSize, write, writeEndDocumentList, writeSolrDocument, writeStartDocumentList, writeStartDocumentList
-
Methods inherited from class org.apache.solr.response.TextResponseWriter
doIndent, getWriter, setIndent, writeDocuments, writeSolrDocumentList, writeVal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.common.util.JsonTextWriter
unicodeEscape, writeArray, writeArray, writeBool, writeDate, writeDouble, writeFloat, writeInt, writeIterator, writeJsonIter, writeLong, writeMap, writeMap, writeNamedList, writeNamedListAsArrArr, writeNamedListAsArrMap, writeNamedListAsFlat, writeNamedListAsMapMangled, writeNamedListAsMapWithDups
-
Methods inherited from interface org.apache.solr.common.util.TextWriter
doIndent, getWriter, setIndent, writeArray, writeDate, writeDouble, writeVal
-
-
-
-
Field Detail
-
gen
protected final com.fasterxml.jackson.dataformat.smile.SmileGenerator gen
-
out
protected final OutputStream out
-
-
Constructor Detail
-
SmileWriter
public SmileWriter(OutputStream out, SolrQueryRequest req, SolrQueryResponse rsp)
-
-
Method Detail
-
writeResponse
public void writeResponse() throws IOException
- Overrides:
writeResponse
in classJSONWriter
- Throws:
IOException
-
writeNumber
public void writeNumber(String name, Number val) throws IOException
- Throws:
IOException
-
writeBool
public void writeBool(String name, Boolean val) throws IOException
- Throws:
IOException
-
writeNull
public void writeNull(String name) throws IOException
- Throws:
IOException
-
writeStr
public void writeStr(String name, String val, boolean needsEscaping) throws IOException
- Throws:
IOException
-
writeLong
public void writeLong(String name, long val) throws IOException
- Throws:
IOException
-
writeInt
public void writeInt(String name, int val) throws IOException
- Throws:
IOException
-
writeBool
public void writeBool(String name, boolean val) throws IOException
- Throws:
IOException
-
writeFloat
public void writeFloat(String name, float val) throws IOException
- Throws:
IOException
-
writeArrayCloser
public void writeArrayCloser() throws IOException
- Throws:
IOException
-
writeArraySeparator
public void writeArraySeparator() throws IOException
- Throws:
IOException
-
writeArrayOpener
public void writeArrayOpener(int size) throws IOException, IllegalArgumentException
- Throws:
IOException
IllegalArgumentException
-
writeMapCloser
public void writeMapCloser() throws IOException
- Throws:
IOException
-
writeMapSeparator
public void writeMapSeparator() throws IOException
- Throws:
IOException
-
writeMapOpener
public void writeMapOpener(int size) throws IOException, IllegalArgumentException
- Throws:
IOException
IllegalArgumentException
-
writeKey
public void writeKey(String fname, boolean needsEscaping) throws IOException
- Throws:
IOException
-
writeByteArr
public void writeByteArr(String name, byte[] buf, int offset, int len) throws IOException
- Throws:
IOException
-
setLevel
public void setLevel(int level)
- Overrides:
setLevel
in classTextResponseWriter
-
level
public int level()
- Specified by:
level
in interfaceTextWriter
- Overrides:
level
in classTextResponseWriter
-
indent
public void indent() throws IOException
- Throws:
IOException
-
indent
public void indent(int lev) throws IOException
- Throws:
IOException
-
incLevel
public int incLevel()
- Specified by:
incLevel
in interfaceTextWriter
- Overrides:
incLevel
in classTextResponseWriter
-
decLevel
public int decLevel()
- Specified by:
decLevel
in interfaceTextWriter
- Overrides:
decLevel
in classTextResponseWriter
-
close
public void close() throws IOException
Description copied from class:TextResponseWriter
done with this ResponseWriter... make sure any buffers are flushed to writer- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classTextResponseWriter
- Throws:
IOException
-
-