|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.item.file.transform.FixedLengthLineAggregator
public class FixedLengthLineAggregator
LineAggregator implementation which produces line by aggregating provided
strings into columns with fixed length. Columns are specified by array of
ranges (setColumns(Range[])
.
Constructor Summary | |
---|---|
FixedLengthLineAggregator()
|
Method Summary | |
---|---|
String |
aggregate(FieldSet fieldSet)
Aggregate provided strings into single line using specified column ranges. |
void |
setAlignment(String alignment)
Recognized alignments are CENTER, RIGHT, LEFT . |
void |
setColumns(Range[] columns)
Set column ranges. |
void |
setPadding(char padding)
Setter for padding (default is space). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedLengthLineAggregator()
Method Detail |
---|
public void setColumns(Range[] columns)
RangeArrayPropertyEditor
this property can be set in the form of
a String describing the range boundaries, e.g. "1,4,7" or "1-3,4-6,7" or
"1-2,4-5,7-10".
columns
- array of Range objects which specify column start and end
positionpublic String aggregate(FieldSet fieldSet)
aggregate
in interface LineAggregator
fieldSet
- arrays of strings representing data to be aggregated
public void setAlignment(String alignment)
CENTER, RIGHT, LEFT
. An
IllegalArgumentException is thrown in case the argument does not match
any of the recognized values.
alignment
- the alignment to be usedpublic void setPadding(char padding)
padding
- the padding character
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |