/** * Configures a given list of fields to retain the padding character in any parsed values, * overriding the any default set for the whole input in {@link FixedWidthParserSettings#getKeepPadding()} * * @param name the name of the first field that should keep the padding character * @param names the names of more fields that should keep the padding character */ public void keepPaddingOn(String name, String... names) { setKeepPaddingFlag(true, name, names); }
/** * Configures a given list of fields to retain the padding character in any parsed values, * overriding the any default set for the whole input in {@link FixedWidthParserSettings#getKeepPadding()} * * @param position the positions of the fields that should keep the padding character * @param positions additional positions */ public void keepPaddingOn(int position, int... positions) { setKeepPaddingFlag(true, position, positions); }
/** * Configures a given list of fields to remove the padding character in any parsed values, * overriding the any default set for the whole input in {@link FixedWidthParserSettings#getKeepPadding()} * * @param position the positions of the fields that should keep the padding character * @param positions additional positions */ public void stripPaddingFrom(int position, int... positions) { setKeepPaddingFlag(false, position, positions); }
/** * Configures a given list of fields to remove the padding character in any parsed values, * overriding the any default set for the whole input in {@link FixedWidthParserSettings#getKeepPadding()} * * @param name the name of the first field that have any padding characters removed * @param names the names of the fields that should have any padding characters removed */ public void stripPaddingFrom(String name, String... names) { setKeepPaddingFlag(false, name, names); }
setKeepPaddingFlag(keepPadding, fieldLengths.size() - 1);