|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.item.file.transform.AbstractLineTokenizer
org.springframework.batch.item.file.transform.FixedLengthTokenizer
public class FixedLengthTokenizer
Tokenizer used to process data obtained from files with fixed-length format.
Columns are specified by array of Range objects (setColumns(Range[])
).
| Field Summary |
|---|
| Fields inherited from class org.springframework.batch.item.file.transform.AbstractLineTokenizer |
|---|
names |
| Constructor Summary | |
|---|---|
FixedLengthTokenizer()
|
|
| Method Summary | |
|---|---|
protected java.util.List<java.lang.String> |
doTokenize(java.lang.String line)
Yields the tokens resulting from the splitting of the supplied line. |
void |
setColumns(Range[] ranges)
Set the column ranges. |
| Methods inherited from class org.springframework.batch.item.file.transform.AbstractLineTokenizer |
|---|
hasNames, isStrict, setFieldSetFactory, setNames, setStrict, tokenize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FixedLengthTokenizer()
| Method Detail |
|---|
public void setColumns(Range[] ranges)
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". If the last range is open then the rest of the line is
read into that column (irrespective of the strict flag setting).
ranges - the column ranges expected in the inputAbstractLineTokenizer.setStrict(boolean)protected java.util.List<java.lang.String> doTokenize(java.lang.String line)
line.
doTokenize in class AbstractLineTokenizerline - the line to be tokenised (can be null)
IncorrectLineLengthException - if line length is greater than or
less than the max range set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||