javatools.filehandlers
Class TSVFile

java.lang.Object
  extended by javatools.filehandlers.TSVFile
All Implemented Interfaces:
java.io.Closeable, java.lang.Iterable<java.util.List<java.lang.String>>, java.util.Iterator<java.util.List<java.lang.String>>

public class TSVFile
extends java.lang.Object
implements java.lang.Iterable<java.util.List<java.lang.String>>, java.util.Iterator<java.util.List<java.lang.String>>, java.io.Closeable

This class is part of the Java Tools (see http://mpii.de/yago-naga/javatools). It is licensed under the Creative Commons Attribution License (see http://creativecommons.org/licenses/by/3.0) by the YAGO-NAGA team (see http://mpii.de/yago-naga). This class iterates over the lines in a TSV file.
Example:

for(List<String> line : new TSVFile("blah.tsv")) {
  System.out.println(line);
}


Constructor Summary
TSVFile(java.io.File f)
           
TSVFile(java.io.File f, java.lang.String msg)
           
TSVFile(java.io.File f, java.lang.String encoding, java.lang.String msg)
           
TSVFile(java.io.Reader f)
           
 
Method Summary
 void close()
           
 boolean hasNext()
           
 java.util.Iterator<java.util.List<java.lang.String>> iterator()
           
static void main(java.lang.String[] args)
           
 java.util.List<java.lang.String> next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TSVFile

public TSVFile(java.io.File f)
        throws java.io.IOException
Throws:
java.io.IOException

TSVFile

public TSVFile(java.io.Reader f)
        throws java.io.IOException
Throws:
java.io.IOException

TSVFile

public TSVFile(java.io.File f,
               java.lang.String msg)
        throws java.io.IOException
Throws:
java.io.IOException

TSVFile

public TSVFile(java.io.File f,
               java.lang.String encoding,
               java.lang.String msg)
        throws java.io.IOException
Throws:
java.io.IOException
Method Detail

iterator

public java.util.Iterator<java.util.List<java.lang.String>> iterator()
Specified by:
iterator in interface java.lang.Iterable<java.util.List<java.lang.String>>

next

public java.util.List<java.lang.String> next()
Specified by:
next in interface java.util.Iterator<java.util.List<java.lang.String>>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<java.util.List<java.lang.String>>

main

public static void main(java.lang.String[] args)

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<java.util.List<java.lang.String>>