Skip to content

Commit 3799e50

Browse files
committed
Javadoc
1 parent 2c35eaa commit 3799e50

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/main/java/org/apache/commons/io/StreamIterator.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,25 @@
2323
import 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
*/
3235
final 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
*/

0 commit comments

Comments
 (0)