org.apache.solr.common.util

## Interface TextWriter

All Superinterfaces:
  AutoCloseable, Closeable, PushWriter

All Known Subinterfaces:
  JsonTextWriter

All Known Implementing Classes:
  SolrJSONWriter

    public interface TextWriter
    extends PushWriter

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`int` `decLevel()`
`boolean` `doIndent()`
`Writer` `getWriter()`
`int` `incLevel()`
`default void` `indent()`
`default void` `indent(int lev)`
`int` `level()`
`TextWriter` `setIndent(boolean doIndent)`
`void` `writeArray(String name, Iterator val)`
`default void` `writeArray(String name, List l)`
`default void` `writeArray(String name, Object[] val)`
`default void` `writeBool(String name, boolean val)`
`default 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
`default void` `writeByteArr(String name, byte[] buf, int offset, int len)`
`default void` `writeDate(String name, Date val)`
`void` `writeDate(String name, String val)` if this form of the method is called, val is the Solr ISO8601 based date format
`default void` `writeDouble(String name, double val)`
`void` `writeDouble(String name, String val)` if this form of the method is called, val is the Java string form of a double
`default 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
`default 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
`default void` `writeIterator(IteratorWriter iw)` Write an array.
`default 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
`default void` `writeMap(MapWriter mw)` Write a Map.
`void` `writeMap(String name, Map val, boolean excludeOuter, boolean isFirstVal)`
`void` `writeNamedList(String name, NamedList val)`
`void` `writeNull(String name)`
`default void` `writeNumber(String name, Number val)`
`void` `writeStr(String name, String val, boolean needsEscaping)`
`default void` `writeVal(String name, Object val)`

### Methods inherited from interface java.io.Closeable

`close`

### Method Detail

#### writeVal

    default void writeVal(String name,
                          Object val)
                   throws IOException

Throws:
  `IOException`

#### writeStr

    void writeStr(String name,
                  String val,
                  boolean needsEscaping)
           throws IOException

Throws:
  `IOException`

#### writeMap

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

Throws:
  `IOException`

#### writeArray

    void writeArray(String name,
                    Iterator val)
             throws IOException

Throws:
  `IOException`

#### writeNull

    void writeNull(String name)
            throws IOException

Throws:
  `IOException`

#### writeInt

    void writeInt(String name,
                  String val)
           throws IOException

if this form of the method is called, val is the Java string form of an int

Throws:
  `IOException`

#### writeLong

    void writeLong(String name,
                   String val)
            throws IOException

if this form of the method is called, val is the Java string form of a long

Throws:
  `IOException`

#### writeBool

    void writeBool(String name,
                   String val)
            throws IOException

if this form of the method is called, val is the Java string form of a boolean

Throws:
  `IOException`

#### writeFloat

    void writeFloat(String name,
                    String val)
             throws IOException

if this form of the method is called, val is the Java string form of a float

Throws:
  `IOException`

#### writeDouble

    void writeDouble(String name,
                     String val)
              throws IOException

if this form of the method is called, val is the Java string form of a double

Throws:
  `IOException`

#### writeDate

    void writeDate(String name,
                   String val)
            throws IOException

if this form of the method is called, val is the Solr ISO8601 based date format

Throws:
  `IOException`

#### writeNamedList

    void writeNamedList(String name,
                        NamedList val)
                 throws IOException

Throws:
  `IOException`

#### getWriter

    Writer getWriter()

#### writeNumber

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

Throws:
  `IOException`

#### writeArray

    default void writeArray(String name,
                            Object[] val)
                     throws IOException

Throws:
  `IOException`

#### writeArray

    default void writeArray(String name,
                            List l)
                     throws IOException

Throws:
  `IOException`

#### writeDate

    default void writeDate(String name,
                           Date val)
                    throws IOException

Throws:
  `IOException`

#### writeByteArr

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

Throws:
  `IOException`

#### writeInt

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

Throws:
  `IOException`

#### writeLong

    default void writeLong(String name,
                           long val)
                    throws IOException

Throws:
  `IOException`

#### writeBool

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

Throws:
  `IOException`

#### writeFloat

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

Throws:
  `IOException`

#### writeDouble

    default void writeDouble(String name,
                             double val)
                      throws IOException

Throws:
  `IOException`

#### writeBool

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

Throws:
  `IOException`

#### writeMap

    default void writeMap(MapWriter mw)
                   throws IOException

Description copied from interface: `PushWriter`
Write a Map. The map is opened in the beginning of the method and closed at the end. All map entries MUST be written before this method returns

Specified by:
  `writeMap` in interface `PushWriter`
Throws:
  `IOException`

#### writeIterator

    default void writeIterator(IteratorWriter iw)
                        throws IOException

Description copied from interface: `PushWriter`
Write an array. The array is opened at the beginning of this method and closed at the end. All array entries must be written before this method returns

Specified by:
  `writeIterator` in interface `PushWriter`
Throws:
  `IOException`

#### indent

    default void indent()
                 throws IOException

Throws:
  `IOException`

#### incLevel

    int incLevel()

#### decLevel

    int decLevel()

#### setIndent

    TextWriter setIndent(boolean doIndent)

#### level

    int level()

#### doIndent

    boolean doIndent()

#### indent

    default void indent(int lev)
                 throws IOException

Throws:
  `IOException`