Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: This method might not consume the iterator, and so you should close it manually.
Reuse: This method might not consume the iterator, and so you should close it manually.
Reuse: This method might not consume the iterator, and so you should close it manually.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: This method might not consume the iterator, and so you should close it manually.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: This method might not consume the iterator, and so you should close it manually.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: This method might not consume the iterator, and so you should close it manually.
Reuse: This method fully consumes the iterator, and so it closes itself.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: This method fully consumes the iterator, and so it closes itself.
Reuse: This method might not consume the iterator, and so you should close it manually.
Reuse: This method might not consume the iterator, and so you should close it manually.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: This method fully consumes the iterator, and so it closes itself.
Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Consuming the first iterator might close the resource. If not, the second will.
Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.
Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.
Use this iterator wherever you need a scala.Iterator.
Use this iterator wherever you need a scala.Iterator. You lose the ability to close the resource manually, but if the iterator is consumed it will still close itself.
Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.
Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
Reuse: If you fully consume the resulting iterator, the resource will be closed.
CloseableIterator
has a similar interface to scala.collection.Iterator, but also is Closeable, and combinators return CloseableIterators.The iterator will close itself when you get the last value, but otherwise you'll want to close it manually. For instance, calls to
drop
andtake
return a CloseableIterator, but it won't close itself when you fully consume it unless it also happens to fully consume the original iterator.