namespaceInput = new DataInputStream(new BufferedInputStream(new FileInputStream(contributionsFile))); int size = namespaceInput.readInt(); KeyedHashSet result = new KeyedHashSet(size); for (int i = 0; i < size; i++) { Contribution n = getObjectFactory().createContribution(namespaceInput.readLong(), false); n.setRawChildren(readArray(namespaceInput)); result.add(n);
synchronized (contributionsFile) { namespaceInput = new DataInputStream(new BufferedInputStream(new FileInputStream(contributionsFile))); int size = namespaceInput.readInt(); KeyedHashSet result = new KeyedHashSet(size); for (int i = 0; i < size; i++) { Contribution n = getObjectFactory().createContribution(namespaceInput.readLong(), false); n.setRawChildren(readArray(namespaceInput)); result.add(n); } return result;
	public KeyedHashSet loadNamespaces() {		DataInputStream namespaceInput = null;		try {			namespaceInput = new DataInputStream(new BufferedInputStream(new FileInputStream(contributionsFile)));			int size = namespaceInput.readInt();			KeyedHashSet result = new KeyedHashSet(size);			for (int i = 0; i < size; i++) {				Contribution n = getObjectFactory().createContribution(namespaceInput.readLong(), false);				n.setRawChildren(readArray(namespaceInput));				result.add(n);			}			return result;		} catch (IOException e) {			String message = NLS.bind(RegistryMessages.meta_regCacheIOExceptionReading, contributionsFile);			log(new Status(IStatus.ERROR, RegistryMessages.OWNER_NAME, fileError, message, e));			return null;		} finally {			if (namespaceInput != null)				try {					namespaceInput.close();				} catch (IOException e1) {					//Ignore				}		}	}