org.apache.solr.response

## Class SmileResponseWriter.SmileWriter

- java.lang.Object
- - org.apache.solr.response.TextResponseWriter
  - - org.apache.solr.response.SmileResponseWriter.SmileWriter

- Enclosing class:
    SmileResponseWriter

      public static class SmileResponseWriter.SmileWriter
      extends TextResponseWriter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected com.fasterxml.jackson.dataformat.smile.SmileGenerator` | `gen`
    `protected OutputStream` | `out`
    `protected String` | `wrapperFunction`

    - ### Fields inherited from class org.apache.solr.response.TextResponseWriter

      `cal, doIndent, level, req, returnFields, rsp, schema, writer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SmileWriter(OutputStream out, SolrQueryRequest req, SolrQueryResponse rsp)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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)`

    - ### Methods inherited from class org.apache.solr.response.TextResponseWriter

      `close, getWriter, setIndent, writeArray, writeDate, writeDocuments, writeDouble, writeExplanation, writeSolrDocumentList, writeTupleStream, writeVal`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### gen

          protected final com.fasterxml.jackson.dataformat.smile.SmileGenerator gen

    - #### out

          protected final OutputStream out

    - #### wrapperFunction

          protected String wrapperFunction

  - ### Constructor Detail

    - #### SmileWriter

          public SmileWriter(OutputStream out,
                             SolrQueryRequest req,
                             SolrQueryResponse rsp)

  - ### Method Detail

    - #### writeResponse

          public void writeResponse()
                             throws IOException

      Throws:
        `IOException`

    - #### writeNumber

          protected void writeNumber(String name,
                                     Number val)
                              throws IOException

      Overrides:
        `writeNumber` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeBool

          public void writeBool(String name,
                                Boolean val)
                         throws IOException

      Overrides:
        `writeBool` in class `TextResponseWriter`
      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

      Overrides:
        `writeLong` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeInt

          public void writeInt(String name,
                               int val)
                        throws IOException

      Overrides:
        `writeInt` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeBool

          public void writeBool(String name,
                                boolean val)
                         throws IOException

      Overrides:
        `writeBool` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeFloat

          public void writeFloat(String name,
                                 float val)
                          throws IOException

      Overrides:
        `writeFloat` in class `TextResponseWriter`
      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

          protected void writeKey(String fname,
                                  boolean needsEscaping)
                           throws IOException

      Throws:
        `IOException`

    - #### writeByteArr

          public void writeByteArr(String name,
                                   byte[] buf,
                                   int offset,
                                   int len)
                            throws IOException

      Overrides:
        `writeByteArr` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### setLevel

          public void setLevel(int level)

      Overrides:
        `setLevel` in class `TextResponseWriter`

    - #### level

          public int level()

      Overrides:
        `level` in class `TextResponseWriter`

    - #### indent

          public void indent()
                      throws IOException

      Overrides:
        `indent` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### indent

          public void indent(int lev)
                      throws IOException

      Overrides:
        `indent` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### incLevel

          public int incLevel()

      Overrides:
        `incLevel` in class `TextResponseWriter`

    - #### decLevel

          public int decLevel()

      Overrides:
        `decLevel` in class `TextResponseWriter`

    - #### writeNamedListAsMapMangled

          protected void writeNamedListAsMapMangled(String name,
                                                    NamedList val)
                                             throws IOException

      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.
      Throws:
        `IOException`

    - #### writeNamedListAsMapWithDups

          protected void writeNamedListAsMapWithDups(String name,
                                                     NamedList val)
                                              throws IOException

      Represents a NamedList directly as a JSON Object (essentially a Map) repeating any keys if they are repeated in the NamedList. null is mapped to "".
      Throws:
        `IOException`

    - #### writeNamedListAsArrMap

          protected void writeNamedListAsArrMap(String name,
                                                NamedList val)
                                         throws IOException

      Throws:
        `IOException`

    - #### writeNamedListAsArrArr

          protected void writeNamedListAsArrArr(String name,
                                                NamedList val)
                                         throws IOException

      Throws:
        `IOException`

    - #### writeNamedListAsFlat

          protected void writeNamedListAsFlat(String name,
                                              NamedList val)
                                       throws IOException

      Throws:
        `IOException`

    - #### writeNamedList

          public void writeNamedList(String name,
                                     NamedList val)
                              throws IOException

      Specified by:
        `writeNamedList` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeSolrDocument

          public void writeSolrDocument(String name,
                                        SolrDocument doc,
                                        ReturnFields returnFields,
                                        int idx)
                                 throws IOException

      Specified by:
        `writeSolrDocument` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeStartDocumentList

          public void writeStartDocumentList(String name,
                                             long start,
                                             int size,
                                             long numFound,
                                             Float maxScore)
                                      throws IOException

      Specified by:
        `writeStartDocumentList` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeEndDocumentList

          public void writeEndDocumentList()
                                    throws IOException

      Specified by:
        `writeEndDocumentList` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeMap

          public void writeMap(String name,
                               Map val,
                               boolean excludeOuter,
                               boolean isFirstVal)
                        throws IOException

      Specified by:
        `writeMap` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeArray

          public void writeArray(String name,
                                 Iterator val)
                          throws IOException

      Specified by:
        `writeArray` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeInt

          public void writeInt(String name,
                               String val)
                        throws IOException

      Description copied from class: `TextResponseWriter`
      if this form of the method is called, val is the Java string form of an int
      Specified by:
        `writeInt` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeLong

          public void writeLong(String name,
                                String val)
                         throws IOException

      Description copied from class: `TextResponseWriter`
      if this form of the method is called, val is the Java string form of a long
      Specified by:
        `writeLong` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeBool

          public void writeBool(String name,
                                String val)
                         throws IOException

      Description copied from class: `TextResponseWriter`
      if this form of the method is called, val is the Java string form of a boolean
      Specified by:
        `writeBool` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeFloat

          public void writeFloat(String name,
                                 String val)
                          throws IOException

      Description copied from class: `TextResponseWriter`
      if this form of the method is called, val is the Java string form of a float
      Specified by:
        `writeFloat` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeDouble

          public void writeDouble(String name,
                                  String val)
                           throws IOException

      Description copied from class: `TextResponseWriter`
      if this form of the method is called, val is the Java string form of a double
      Specified by:
        `writeDouble` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### writeDate

          public void writeDate(String name,
                                String val)
                         throws IOException

      Description copied from class: `TextResponseWriter`
      if this form of the method is called, val is the Solr ISO8601 based date format
      Specified by:
        `writeDate` in class `TextResponseWriter`
      Throws:
        `IOException`

    - #### unicodeEscape

          protected static void unicodeEscape(Appendable out,
                                              int ch)
                                       throws IOException

      Throws:
        `IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.