RESOLVED - issue BATCH-393: DefaultFieldSet should not always trim whitespace from the value returned
http://jira.springframework.org/browse/BATCH-393 added readRawString(int) and readRawString(String) methods to FieldSet interface
This commit is contained in:
@@ -95,6 +95,22 @@ public class DefaultFieldSet implements FieldSet {
|
||||
public String readString(String name) {
|
||||
return readString(indexOf(name));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.batch.io.file.mapping.IFieldSet#readRawString(int)
|
||||
*/
|
||||
public String readRawString(int index) {
|
||||
return tokens[index];
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.batch.io.file.mapping.IFieldSet#readRawString(java.lang.String)
|
||||
*/
|
||||
public String readRawString(String name) {
|
||||
return readRawString(indexOf(name));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -61,6 +61,23 @@ public interface FieldSet {
|
||||
*/
|
||||
String readString(String name);
|
||||
|
||||
/**
|
||||
* Read the {@link String} value at index '<code>index</code>' including
|
||||
* trailing whitespace (don't trim).
|
||||
*
|
||||
* @param index the field index.
|
||||
* @throws IndexOutOfBoundsException if the index is out of bounds.
|
||||
*/
|
||||
String readRawString(int index);
|
||||
|
||||
/**
|
||||
* Read the {@link String} value from column with given '<code>name</code>'
|
||||
* including trailing whitespace (don't trim).
|
||||
*
|
||||
* @param name the field name.
|
||||
*/
|
||||
String readRawString(String name);
|
||||
|
||||
/**
|
||||
* Read the '<code>boolean</code>' value at index '<code>index</code>'.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user