File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/io Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323import java .util .stream .Stream ;
2424
2525/**
26- * Wraps and presents a stream as a closable iterator resource that automatically closes itself when reaching the end
27- * of stream.
26+ * Wraps and presents a stream as a closable {@link Iterator} resource that automatically closes itself when reaching the end of stream.
27+ * <h2>Warning</h2>
28+ * <p>
29+ * In order to close the stream, the call site MUST either close the stream it allocated OR call the iterator until the end.
30+ * </p>
2831 *
2932 * @param <E> The stream and iterator type.
3033 * @since 2.9.0
3134 */
3235final class StreamIterator <E > implements Iterator <E >, Closeable {
3336
3437 /**
35- * Wraps and presents a stream as a closable resource that automatically closes itself when reaching the end of
36- * stream.
38+ * Wraps and presents a stream as a closable resource that automatically closes itself when reaching the end of stream.
3739 * <h2>Warning</h2>
3840 * <p>
39- * In order to close the stream, the call site MUST either close the stream it allocated OR call the iterator until
40- * the end.
41+ * In order to close the stream, the call site MUST either close the stream it allocated OR call the iterator until the end.
4142 * </p>
4243 *
43- * @param <T> The stream and iterator type.
44+ * @param <T> The stream and iterator type.
4445 * @param stream The stream iterate.
4546 * @return A new iterator.
4647 */
You can’t perform that action at this time.
0 commit comments