nl.knowledgeplaza.util
Class FileUtil.TextfileIterator

java.lang.Object
  extended by nl.knowledgeplaza.util.FileUtil.TextfileIterator
All Implemented Interfaces:
Closeable, Iterable<String>, Iterator<String>
Enclosing class:
FileUtil

public static class FileUtil.TextfileIterator
extends Object
implements Iterable<String>, Iterator<String>, Closeable

A class for iterating over a file

Author:
user

Constructor Summary
FileUtil.TextfileIterator(File file)
           
 
Method Summary
 void close()
          close the streams
 boolean hasNext()
           
 Iterator<String> iterator()
           
 String next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil.TextfileIterator

public FileUtil.TextfileIterator(File file)
                          throws IOException
Throws:
IOException
Method Detail

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<String>

next

public String next()
Specified by:
next in interface Iterator<String>

remove

public void remove()
Specified by:
remove in interface Iterator<String>

close

public void close()
close the streams

Specified by:
close in interface Closeable


Copyright © 2011 KnowledgePlaza. All Rights Reserved.