org.milyn.csv.prog
Class CSVMapBinder

java.lang.Object
  extended by org.milyn.csv.prog.CSVMapBinder

public class CSVMapBinder
extends Object

CSV Map Binder class.

Simple CSV to Object Map binding class.

Exmaple usage:

 public class PeopleBinder {
     // Create and cache the binder instance..
     private CSVMapBinder binder = new CSVMapBinder("firstname,lastname,gender,age,country", Person.class, "firstname");

     public Map<String, Person> bind(Reader csvStream) {
         return binder.bind(csvStream);
     }
 }
 

Author:
tom.fennelly@jboss.com

Constructor Summary
CSVMapBinder(String fields, Class recordType, String keyField)
           
 
Method Summary
 Map bind(InputStream csvStream)
           
 Map bind(Reader csvStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVMapBinder

public CSVMapBinder(String fields,
                    Class recordType,
                    String keyField)
Method Detail

bind

public Map bind(Reader csvStream)

bind

public Map bind(InputStream csvStream)


Copyright © 2018. All rights reserved.