|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.common.iterator.FileLineIterable
public final class FileLineIterable
Iterable representing the lines of a text file. It can produce an Iterator
over those lines. This
assumes the text file's lines are delimited in a manner consistent with how BufferedReader
defines lines.
This class will uncompress files that end in .zip or .gz accordingly, too.
Constructor Summary | |
---|---|
FileLineIterable(File file)
Creates a over a given file, assuming a UTF-8 encoding. |
|
FileLineIterable(File file,
boolean skipFirstLine)
Creates a over a given file, assuming a UTF-8 encoding. |
|
FileLineIterable(File file,
Charset encoding,
boolean skipFirstLine)
Creates a over a given file, using the given encoding. |
|
FileLineIterable(InputStream is)
|
|
FileLineIterable(InputStream is,
boolean skipFirstLine)
|
|
FileLineIterable(InputStream is,
Charset encoding,
boolean skipFirstLine)
|
Method Summary | |
---|---|
Iterator<String> |
iterator()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileLineIterable(File file) throws IOException
IOException
public FileLineIterable(File file, boolean skipFirstLine) throws IOException
IOException
public FileLineIterable(File file, Charset encoding, boolean skipFirstLine) throws IOException
IOException
public FileLineIterable(InputStream is)
public FileLineIterable(InputStream is, boolean skipFirstLine)
public FileLineIterable(InputStream is, Charset encoding, boolean skipFirstLine)
Method Detail |
---|
public Iterator<String> iterator()
iterator
in interface Iterable<String>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |