char[] getFieldPaddings(FixedWidthFormat format) { char[] out = getFieldPaddings(); for (int i = 0; i < out.length; i++) { if (out[i] == '\0') { out[i] = format.getPadding(); } } return out; }
/** * Returns the sequence of paddings used by each field of each record. * * @return the sequence of paddings used by each field of each record. */ char[] getFieldPaddings() { if (fieldLengths == null) { return null; } return fieldLengths.getFieldPaddings(this.getFormat()); }
/** * Returns the sequence of paddings used by each field of each record. * * @return the sequence of paddings used by each field of each record. */ char[] getFieldPaddings() { if (fieldLengths == null) { return null; } return fieldLengths.getFieldPaddings(getFormat()); }
Lookup(String value, FixedWidthFields config, FixedWidthFormat format) { this.value = value.toCharArray(); this.lengths = config.getAllLengths(); this.alignments = config.getFieldAlignments(); this.fieldNames = config.getFieldNames(); this.paddings = config.getFieldPaddings(format); this.wildcard = format.getLookupWildcard(); this.ignore = config.getFieldsToIgnore(); this.keepPaddingFlags = config.getKeepPaddingFlags(); }