com.isomorphic.datasource

## Class StreamingResponseIterator

- com.isomorphic.datasource.StreamingResponseIterator

-     public class StreamingResponseIterator

  For DSRequests that are marked "streamResults: true", the data member of the corresponding DSResponse will be an instance of StreamingResponseIterator. The framework will use this iterator to render results back to the client, or to the various data exporters, on a record-by-record basis, thus avoiding excessive memory overhead when processing large datasets. Your own code can traverse the underlying data, either by calling next() on this object, or by calling the DSResponse's nextRecord() and nextRecordAsObject() APIs. Note that these two approaches may or may not be navigating the same underlying object, and behavior if user code accesses it with both the StreamingResponseIterator and the DSResponse APIs is undefined.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()` Returns true if this StreamingResponseIterator has more items to return.
    `java.lang.Object` | `next()` Returns the next item, or null if there are no more to return
    `void` | `remove()` This method is part of Iterator's contract, but in this case it no-ops - as a sequential accessor of pre-fetched data, StreamingResponseIterator is obviously read-only

- - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Returns true if this StreamingResponseIterator has more items to return.
      Returns:
        true if there are more records to stream, otherwise false

    - #### next

          public java.lang.Object next()

      Returns the next item, or null if there are no more to return
      Returns:
        the next item

    - #### remove

          public void remove()

      This method is part of Iterator's contract, but in this case it no-ops - as a sequential accessor of pre-fetched data, StreamingResponseIterator is obviously read-only