1 package org.kuali.ole.sys.batch;
2
3
4
5
6
7 public class FixedWidthFlatFileSpecification extends AbstractFlatFilePrefixSpecificationBase {
8
9
10
11
12 public void parseLineIntoObject(FlatFileObjectSpecification parseSpecification, String lineToParse, Object parseIntoObject, int lineNumber) {
13
14
15 for (FlatFilePropertySpecification propertySpecification : parseSpecification.getParseProperties()) {
16 int start = ((FixedWidthFlatFilePropertySpecification) propertySpecification).getStart();
17 int end = ((FixedWidthFlatFilePropertySpecification) propertySpecification).getEnd();
18
19 if (end == 0) {
20 end = lineToParse.length();
21 }
22 String subString = lineToParse.substring(start, end);
23 propertySpecification.setProperty(subString, parseIntoObject, lineNumber);
24 }
25 }
26 }