net.sf.jmatchparser.util.csv
Class PropertiesCSVWriter

java.lang.Object
  extended by net.sf.jmatchparser.util.csv.AbstractCSVWriter
      extended by net.sf.jmatchparser.util.csv.PropertiesCSVWriter

public class PropertiesCSVWriter
extends AbstractCSVWriter

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


Constructor Summary
PropertiesCSVWriter(OutputStream out, int firstIndex, Format... columnFormats)
          Create a new PropertiesCSVWriter that writes to the given output stream.
PropertiesCSVWriter(OutputStream out, int firstIndex, String... columnFormats)
          Create a new PropertiesCSVWriter that writes to the given output stream.
PropertiesCSVWriter(Properties properties, int firstIndex, Format... columnFormats)
          Create a new PropertiesCSVWriter that writes to the given Properties file.
PropertiesCSVWriter(Properties properties, int firstIndex, String... columnFormats)
          Create a new PropertiesCSVWriter that writes to the given Properties file.
 
Method Summary
 void close()
          Close this CSV writer.
 void flush()
          Flush this CSV writer.
 void write(String... record)
          Write a record (line) into this CSV file.
 
Methods inherited from class net.sf.jmatchparser.util.csv.AbstractCSVWriter
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesCSVWriter

public PropertiesCSVWriter(Properties properties,
                           int firstIndex,
                           String... columnFormats)
Create a new PropertiesCSVWriter that writes to 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

PropertiesCSVWriter

public PropertiesCSVWriter(Properties properties,
                           int firstIndex,
                           Format... columnFormats)
Create a new PropertiesCSVWriter that writes to 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

PropertiesCSVWriter

public PropertiesCSVWriter(OutputStream out,
                           int firstIndex,
                           String... columnFormats)
Create a new PropertiesCSVWriter that writes to the given output stream. Each columnFormat is evaluated for each row number to return the respective property name for this column.

Parameters:
out - Output stream to write to
firstIndex - index of the first row
columnFormats - column formats

PropertiesCSVWriter

public PropertiesCSVWriter(OutputStream out,
                           int firstIndex,
                           Format... columnFormats)
Create a new PropertiesCSVWriter that writes to the given output stream. Each columnFormat is evaluated for each row number to return the respective property name for this column.

Parameters:
out - Output stream to write to
firstIndex - index of the first row
columnFormats - column formats
Method Detail

flush

public void flush()
           throws IOException
Description copied from class: AbstractCSVWriter
Flush this CSV writer.

Specified by:
flush in class AbstractCSVWriter
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: AbstractCSVWriter
Close this CSV writer.

Specified by:
close in class AbstractCSVWriter
Throws:
IOException

write

public void write(String... record)
           throws IOException
Description copied from class: AbstractCSVWriter
Write a record (line) into this CSV file.

Specified by:
write in class AbstractCSVWriter
Throws:
IOException


Copyright © 2011. All Rights Reserved.