net.sf.jmatchparser.util.csv
Class PropertiesCSVReader

java.lang.Object
  extended by net.sf.jmatchparser.util.csv.AbstractCSVReader
      extended by net.sf.jmatchparser.util.csv.PropertiesCSVReader

public class PropertiesCSVReader
extends AbstractCSVReader

Class to read data from a Properties file as if it was a CSV (Comma Separated Value) file.


Constructor Summary
PropertiesCSVReader(Properties properties, int firstIndex, Format... columnFormats)
          Create a new PropertiesCSVReader that reads from the given Properties file.
PropertiesCSVReader(Properties properties, int firstIndex, String... columnFormats)
          Create a new PropertiesCSVReader that reads from the given Properties file.
 
Method Summary
 void close()
          Close this reader.
 String[] read()
          Read a row from this XML file.
 
Methods inherited from class net.sf.jmatchparser.util.csv.AbstractCSVReader
read, read, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesCSVReader

public PropertiesCSVReader(Properties properties,
                           int firstIndex,
                           String... columnFormats)
Create a new PropertiesCSVReader that reads from the given Properties file. Each columnFormat is evaluated for each row number to return the respective property name for this column.

Parameters:
properties - Property file to write to
firstIndex - index of the first row
columnFormats - column formats

PropertiesCSVReader

public PropertiesCSVReader(Properties properties,
                           int firstIndex,
                           Format... columnFormats)
Create a new PropertiesCSVReader that reads from the given Properties file. Each columnFormat is evaluated for each row number to return the respective property name for this column.

Parameters:
properties - Property file to write to
firstIndex - index of the first row
columnFormats - column formats
Method Detail

close

public void close()
           throws IOException
Close this reader. This is a no-op.

Specified by:
close in class AbstractCSVReader
Throws:
IOException

read

public String[] read()
              throws IOException
Read a row from this XML file.

Specified by:
read in class AbstractCSVReader
Throws:
IOException


Copyright © 2011. All Rights Reserved.