Boolean (String fileText, String prefix) { String[] strings = findArrayWithPrefixes(fileText, prefix); if (strings.length > 0) { assert strings.length == 1; return Boolean.parseBoolean(strings[0]); } return null; }