org.apache.solr.client.solrj.io

## Class PushBackStream

- java.lang.Object
- - org.apache.solr.client.solrj.io.TupleStream
  - - org.apache.solr.client.solrj.io.PushBackStream

All Implemented Interfaces:
  Serializable

    public class PushBackStream
    extends TupleStream

A TupleStream that allows a single Tuple to be pushed back onto the stream after it's been read. This is a useful class when building streams that maintain the order of Tuples between multiple substreams.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`PushBackStream(TupleStream stream)`

### Method Summary

Methods
`List<TupleStream>` `children()`
`void` `close()`
`int` `getCost()`
`void` `open()`
`void` `pushBack(Tuple tuple)`
`Tuple` `read()`
`void` `setStreamContext(StreamContext context)`

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

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

### Constructor Detail

#### PushBackStream

    public PushBackStream(TupleStream stream)

### Method Detail

#### setStreamContext

    public void setStreamContext(StreamContext context)

Specified by:
  `setStreamContext` in class `TupleStream`

#### children

    public List<TupleStream> children()

Specified by:
  `children` in class `TupleStream`

#### open

    public void open()
              throws IOException

Specified by:
  `open` in class `TupleStream`
Throws:
  `IOException`

#### close

    public void close()
               throws IOException

Specified by:
  `close` in class `TupleStream`
Throws:
  `IOException`

#### pushBack

    public void pushBack(Tuple tuple)

#### read

    public Tuple read()
               throws IOException

Specified by:
  `read` in class `TupleStream`
Throws:
  `IOException`

#### getCost

    public int getCost()

Overrides:
  `getCost` in class `TupleStream`