Map<String, Course> courseMap, int curriculumListSize) throws IOException {
readEmptyLine();
readConstantLine("CURRICULA:");
List<Curriculum> curriculumList = new ArrayList<Curriculum>(curriculumListSize);
for (int i = 0; i < curriculumListSize; i++) {
Curriculum curriculum = new Curriculum();
curriculum.setId((long) i);
// Curricula: <CurriculumID> <# Courses> <MemberID> ... <MemberID>
String line = bufferedReader.readLine();
String[] lineTokens = splitBySpacesOrTabs(line);
if (lineTokens.length < 2) {
throw new IllegalArgumentException("Read line (" + line
+ ") is expected to contain at least 2 tokens.");
}
curriculum.setCode(lineTokens[0]);
int coursesInCurriculum = Integer.parseInt(lineTokens[1]);
if (lineTokens.length != (coursesInCurriculum + 2)) {
throw new IllegalArgumentException("Read line (" + line + ") is expected to contain "
+ (coursesInCurriculum + 2) + " tokens.");
}