resultCodeStr = null;
}
resultCode = fieldParsers.parseInteger(
resultCodeStr, ArcConstants.FN_RESULT_CODE, false);
if (resultCode != null && (resultCode < 100 || resultCode > 999)) {
diagnostics.addError(new Diagnosis(DiagnosisType.INVALID_EXPECTED,
"'" + ArcConstants.FN_RESULT_CODE + "' value",
resultCodeStr,
"A number between 100 and 999"));
}
checksumStr = fields[ArcConstants.FN_IDX_CHECKSUM];
if ("-".equals(checksumStr)) {
checksumStr = null;
}
checksumStr = fieldParsers.parseString(
checksumStr, ArcConstants.FN_CHECKSUM, true);
locationStr = fields[ArcConstants.FN_IDX_LOCATION];
if ("-".equals(locationStr)) {
locationStr = null;
}
locationStr = fieldParsers.parseString(
locationStr, ArcConstants.FN_LOCATION, true);
offsetStr = fields[ArcConstants.FN_IDX_OFFSET];
if ("-".equals(offsetStr)) {
offsetStr = null;
}
offset = fieldParsers.parseLong(
offsetStr, ArcConstants.FN_OFFSET, false);
if (offset != null && offset < 0) {
diagnostics.addError(new Diagnosis(DiagnosisType.INVALID_EXPECTED,
"'" + ArcConstants.FN_OFFSET + "' value",
offsetStr,
"A non negative number"));
}
filenameStr = fields[ArcConstants.FN_IDX_FILENAME];
if ("-".equals(filenameStr)) {
filenameStr = null;
}
filenameStr = reader.fieldParsers.parseString(
filenameStr, ArcConstants.FN_FILENAME, false);
}
archiveLengthStr = fields[fields.length - 1];
if ("-".equals(archiveLengthStr)) {
archiveLengthStr = null;
}
archiveLength = reader.fieldParsers.parseLong(
archiveLengthStr, ArcConstants.FN_ARCHIVE_LENGTH, false);
if (archiveLength != null && archiveLength < 0) {
diagnostics.addError(new Diagnosis(DiagnosisType.INVALID_EXPECTED,
"'" + ArcConstants.FN_ARCHIVE_LENGTH + "' value",
archiveLengthStr,
"A non negative number"));
}
}