org.knime.core.data.container
Class CloseableRowIterator
java.lang.Object
org.knime.core.data.RowIterator
org.knime.core.data.container.CloseableRowIterator
- All Implemented Interfaces:
- Iterator<DataRow>
- Direct Known Subclasses:
- Buffer.FromFileIterator, CloseableFilterColumnRowIterator, JoinTableIterator
public abstract class CloseableRowIterator
- extends RowIterator
A row iterator
that can be closed in order to save
resources. Iterator of this class are returned by tables created with a
DataContainer
or BufferedDataContainer
,
which typically read from file. If the iterator is not pushed to the end of
the table, the input stream is not closed, which can cause system failures.
This iterator allows the user to close the stream early on (before reaching
the end of the table in which case the stream is closed anyway).
- Author:
- Bernd Wiswedel, University of Konstanz
Method Summary |
abstract void |
close()
Closes this iterator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CloseableRowIterator
public CloseableRowIterator()
close
public abstract void close()
- Closes this iterator. Subsequent calls of
RowIterator.hasNext()
will return false
. This method does not need to be called
if the iterator was pushed to the end (stream will be closed
automatically). It's meant to be used in cases where the iterator might
not advance to the end of the table.
This method does nothing if the table is already closed (multiple
invocations are ignored).
Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display,
or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the
copyright owner or as specified in the license file distributed with this product.