Package org.apache.solr.client.solrj.response

# Class InputStreamResponseParser

java.lang.Object
org.apache.solr.client.solrj.response.ResponseParser
org.apache.solr.client.solrj.response.InputStreamResponseParser

public class InputStreamResponseParser extends ResponseParser
Simply puts the InputStream into an entry in a NamedList named "stream".

See Also:
  - `InputStreamResponse`

## Field Summary

Fields
Modifier and Type
Field
Description
`static String`
`HTTP_STATUS_KEY`
`static String`
`STREAM_KEY`

## Constructor Summary

Constructors
Constructor
Description
`InputStreamResponseParser(String writerType)`

## Method Summary

Modifier and Type
Method
Description
`static String`
`consumeResponseToString(NamedList<Object> response)`
When using a `InputStreamResponseParser`, the raw output is available in the response under the key `STREAM_KEY`.
`static NamedList<Object>`
`createInputStreamNamedList(int httpStatus, InputStream inputStream)`
`Set<String>`
`getContentTypes()`
A well-behaved ResponseParser will return the content-types it supports.
`String`
`getWriterType()`
The writer type placed onto the request as the `wt` param.
`NamedList<Object>`
`processResponse(InputStream body, String encoding)`

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

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

## Field Details

### STREAM_KEY

public static String STREAM_KEY

### HTTP_STATUS_KEY

public static String HTTP_STATUS_KEY

## Constructor Details

### InputStreamResponseParser

public InputStreamResponseParser(String writerType)

## Method Details

### consumeResponseToString

public static String consumeResponseToString(NamedList<Object> response) throws IOException
When using a `InputStreamResponseParser`, the raw output is available in the response under the key `STREAM_KEY`.

Throws:
  `IOException`

### getWriterType

public String getWriterType()
Description copied from class: `ResponseParser`
The writer type placed onto the request as the `wt` param.

Specified by:
  `getWriterType` in class `ResponseParser`

### processResponse

public NamedList<Object> processResponse(InputStream body, String encoding) throws IOException

Specified by:
  `processResponse` in class `ResponseParser`
Throws:
  `IOException`

### getContentTypes

public Set<String> getContentTypes()
Description copied from class: `ResponseParser`
A well-behaved ResponseParser will return the content-types it supports.

Specified by:
  `getContentTypes` in class `ResponseParser`
Returns:
  the content-type values that this parser is capable of parsing. Never null. Empty means no enforcement.

### createInputStreamNamedList

public static NamedList<Object> createInputStreamNamedList(int httpStatus, InputStream inputStream)