Class ConsumingIteration

All Implemented Interfaces:
AutoCloseable, CloseableIteration<BindingSet,QueryEvaluationException>, Iteration<BindingSet,QueryEvaluationException>

public class ConsumingIteration extends Object implements CloseableIteration<BindingSet,QueryEvaluationException>
A specialized CloseableIteration that consumes part (or the entire input iteration if it fits into the buffer) and keeps data for further processing in memory. If the buffer is full, the remaining items will be read from the iteration lazily. This implementation can be used to avoid blocking behavior in HTTP connection streams, i.e. to process results in memory and close the underlying HTTP stream.
Andreas Schwarte