org.milyn.fixedlength.prog
Class FixedLengthMapBinder
java.lang.Object
org.milyn.fixedlength.prog.FixedLengthMapBinder
public class FixedLengthMapBinder
- extends java.lang.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(java.lang.String fields,
java.lang.Class recordType,
java.lang.String keyField)
|
|
Method Summary |
java.util.Map |
bind(java.io.InputStream fixedLengthStream)
|
java.util.Map |
bind(java.io.Reader fixedLengthStream)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FixedLengthMapBinder
public FixedLengthMapBinder(java.lang.String fields,
java.lang.Class recordType,
java.lang.String keyField)
bind
public java.util.Map bind(java.io.Reader fixedLengthStream)
bind
public java.util.Map bind(java.io.InputStream fixedLengthStream)
Copyright © 2011. All Rights Reserved.