Add section on LineIterator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@383222 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/xdocs/description.xml b/xdocs/description.xml
index 62c5371..f1f433c 100755
--- a/xdocs/description.xml
+++ b/xdocs/description.xml
@@ -172,6 +172,26 @@
</section>
+ <section name="Line iterator">
+ <p>
+ The <code>org.apache.commons.io.LineIterator</code> class
+ provides a flexible way for working with a line-based file.
+ An instance can be created directly, or via factory methods on
+ <code>FileUtils</code> or <code>IOUtils</code>.
+ The recommended usage pattern is:
+ </p>
+ <pre>
+ LineIterator it = FileUtils.lineIterator(file, "UTF-8");
+ try {
+ while (it.hasNext()) {
+ String line = it.nextLine();
+ /// do something with line
+ }
+ } finally {
+ LineIterator.closeQuietly(iterator);
+ }</pre>
+ </section>
+
<section name="File filters">
<p>
The <code>org.apache.commons.io.filefilter</code>