JavaBinUpdateRequestCodec (Solr 3.6.2 API)
Keywords: org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.client.solrj.request
Class JavaBinUpdateRequestCodec

    java.lang.Object
      org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec

    public class JavaBinUpdateRequestCodec

extends Object

Provides methods for marshalling an UpdateRequest to a NamedList which can be serialized in the javabin format and vice versa.

Since:
  solr 1.4
Version:
  $Id: JavaBinUpdateRequestCodec.java 1235304 2012-01-24 15:39:17Z janhoy $
See Also:
  `JavaBinCodec`

Nested Class Summary
`static interface` | `JavaBinUpdateRequestCodec.StreamingUpdateHandler`

Constructor Summary
`JavaBinUpdateRequestCodec()`

Method Summary
`void` | `marshal(UpdateRequest updateRequest, OutputStream os)` Converts an UpdateRequest to a NamedList which can be serialized to the given OutputStream in the javabin format
`UpdateRequest` | `unmarshal(InputStream is, JavaBinUpdateRequestCodec.StreamingUpdateHandler handler)` Reads a NamedList from the given InputStream, converts it into a SolrInputDocument and passes it to the given StreamingDocumentHandler

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JavaBinUpdateRequestCodec

    public JavaBinUpdateRequestCodec()

Method Detail

### marshal

    public void marshal(UpdateRequest updateRequest,
                        OutputStream os)
                 throws IOException

  Converts an UpdateRequest to a NamedList which can be serialized to the given OutputStream in the javabin format

  Parameters:
    `updateRequest` - the UpdateRequest to be written out
    `os` - the OutputStream to which the request is to be written
  Throws:
    `IOException` - in case of an exception during marshalling or writing to the stream

### unmarshal

    public UpdateRequest unmarshal(InputStream is,
                                   JavaBinUpdateRequestCodec.StreamingUpdateHandler handler)
                            throws IOException

  Reads a NamedList from the given InputStream, converts it into a SolrInputDocument and passes it to the given StreamingDocumentHandler

  Parameters:
    `is` - the InputStream from which to read
    `handler` - an instance of StreamingDocumentHandler to which SolrInputDocuments are streamed one by one
  Returns:
    the UpdateRequest
  Throws:
    `IOException` - in case of an exception while reading from the input stream or unmarshalling

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD