Author: scolebourne
Date: Sat Mar 4 15:19:31 2006
New Revision: 383222
URL: http://svn.apache.org/viewcvs?rev=383222&view=rev
Log:
Add section on LineIterator
Modified:
jakarta/commons/proper/io/trunk/xdocs/description.xml
Modified: jakarta/commons/proper/io/trunk/xdocs/description.xml
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/xdocs/description.xml?rev=383222&r1=383221&r2=383222&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/xdocs/description.xml (original)
+++ jakarta/commons/proper/io/trunk/xdocs/description.xml Sat Mar 4 15:19:31
2006
@@ -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>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]