private int parseBatchHint(int pos, String option) { int startPos = pos + option.length(); int endPos = findEndPos(startPos, inputProperties); if (endPos == -1) { inputProperties = StringHelper.replaceString(inputProperties, option, ""); return 0; } else { String batchParam = inputProperties.substring(startPos + 1, endPos); if (endPos + 1 >= inputProperties.length()) { inputProperties = inputProperties.substring(0, pos); } else { inputProperties = inputProperties.substring(0, pos) + inputProperties.substring(endPos + 1); } return Integer.parseInt(batchParam); } }