org.apache.solr.client.solrj.request

## Class RequestWriter

- java.lang.Object
- - org.apache.solr.client.solrj.request.RequestWriter

- Direct Known Subclasses:
    BinaryRequestWriter

      public class RequestWriter
      extends Object

  A RequestWriter is used to write requests to Solr.

  A subclass can override the methods in this class to supply a custom format in which a request can be sent.

  Since:
    solr 1.4

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `RequestWriter.LazyContentStream`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Charset` | `UTF_8`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestWriter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ContentStream` | `getContentStream(UpdateRequest req)`
    `Collection<ContentStream>` | `getContentStreams(SolrRequest req)`
    `String` | `getPath(SolrRequest req)`
    `String` | `getUpdateContentType()`
    `protected boolean` | `isNull(List l)`
    `protected boolean` | `isNull(Map l)`
    `void` | `write(SolrRequest request, OutputStream os)`

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

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

- - ### Field Detail

    - #### UTF_8

          public static final Charset UTF_8

  - ### Constructor Detail

    - #### RequestWriter

          public RequestWriter()

  - ### Method Detail

    - #### getContentStreams

          public Collection<ContentStream> getContentStreams(SolrRequest req)
                                                      throws IOException

      Throws:
        `IOException`

    - #### getPath

          public String getPath(SolrRequest req)

    - #### getContentStream

          public ContentStream getContentStream(UpdateRequest req)
                                         throws IOException

      Throws:
        `IOException`

    - #### write

          public void write(SolrRequest request,
                            OutputStream os)
                     throws IOException

      Throws:
        `IOException`

    - #### getUpdateContentType

          public String getUpdateContentType()

    - #### isNull

          protected boolean isNull(List l)

    - #### isNull

          protected boolean isNull(Map l)

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