if (line == null || !line.equals(JAR_FILES_KEY)) throw new IOException("Bad format: missing jar files key"); while ((line = getLine(reader)) != null && !line.equals(SRC_DIRS_KEY)) { addToListInternal(jarList, line); }  if (line == null) throw new IOException("Bad format: missing source dirs key"); while ((line = getLine(reader)) != null && !line.equals(AUX_CLASSPATH_ENTRIES_KEY)) { addToListInternal(srcDirList, line); }   if (line != null) { while ((line = getLine(reader)) != null) { if (line.equals(OPTIONS_KEY)) break; addToListInternal(auxClasspathEntryList, line); } }
	public void read(InputStream in) throws IOException {		if (isModified)			throw new IllegalStateException("Reading into a modified Project!");				BufferedReader reader = null;				try		{			reader = new BufferedReader(new InputStreamReader(in));			String line;			line = getLine(reader);			//The Options section is optional to support older files			if (line != null && line.equals(OPTIONS_KEY)) {				while ((line = getLine(reader)) != null && !line.equals(JAR_FILES_KEY))					parseOption(line);			}			if (line == null || !line.equals(JAR_FILES_KEY)) throw new IOException("Bad format: missing jar files key");			while ((line = getLine(reader)) != null && !line.equals(SRC_DIRS_KEY)) {				addJar(line);			}			if (line == null) throw new IOException("Bad format: missing source dirs key");			while ((line = getLine(reader)) != null && !line.equals(AUX_CLASSPATH_ENTRIES_KEY)) {				addSourceDir(line);			}			if (line != null) {				// The list of aux classpath entries is optional				while ((line = getLine(reader)) != null) {					addAuxClasspathEntry(line);				}			}				// Clear the modification flag set by the various "add" methods.			isModified = false;		}		finally {			if (reader != null)				reader.close();		}	}