org.milyn.fixedlength.prog
Class FixedLengthMapBinder

java.lang.Object
  extended by org.milyn.fixedlength.prog.FixedLengthMapBinder

public class FixedLengthMapBinder
extends Object

Fixed Length Map Binder class.

Simple Fixed Length records to Object Map binding class.

Exmaple usage:

 public class PeopleBinder {
     // Create and cache the binder instance..
     private FixedLengthMapBinder binder = new FixedLengthMapBinder("firstname[10],lastname[10],gender[1],age[3],country[2]", Person.class, "firstname");

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

Author:
maurice.zeijen@smies.com

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

Constructor Detail

FixedLengthMapBinder

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

bind

public Map bind(Reader fixedLengthStream)

bind

public Map bind(InputStream fixedLengthStream)


Copyright © 2014. All Rights Reserved.