public static RefactoringDescriptorProxy[] readRefactoringDescriptorProxies(final InputStream stream, final String project, final long start, final long end, final int flags) throws IOException { final List list= new ArrayList(); final BufferedReader reader= new BufferedReader(new InputStreamReader(stream, IRefactoringSerializationConstants.OUTPUT_ENCODING)); while (reader.ready()) { final String line= reader.readLine(); if (line != null) { final int index= line.indexOf(DELIMITER_COMPONENT); if (index > 0) { try { final long stamp= new Long(line.substring(0, index)).longValue(); if (stamp >= start && stamp <= end) list.add(new DefaultRefactoringDescriptorProxy(unescapeString(line.substring(index + 1)), project, stamp)); } catch (NumberFormatException exception) {
private static void readRefactoringDescriptorProxies(final IFileStore store, final String project, final Collection collection, final long start, final long end, final int flags, final IProgressMonitor monitor) throws CoreException { try { monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_retrieving_history, 22); final IFileInfo info= store.fetchInfo(EFS.NONE, new SubProgressMonitor(monitor, 2, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)); if (store.getName().equalsIgnoreCase(RefactoringHistoryService.NAME_INDEX_FILE) && !info.isDirectory() && info.exists()) { InputStream stream= null; try { stream= store.openInputStream(EFS.NONE, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)); final RefactoringDescriptorProxy[] proxies= readRefactoringDescriptorProxies(stream, project, start, end, flags); for (int index= 0; index < proxies.length; index++) collection.add(proxies[index]); monitor.worked(1); } catch (IOException exception) { throw new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), 0, exception.getLocalizedMessage(), null)); } finally { monitor.worked(1); if (stream != null) { try { stream.close(); } catch (IOException exception) {  }
	public static RefactoringDescriptorProxy[] readRefactoringDescriptorProxies(final InputStream stream, final String project, final long start, final long end, final int flags) throws IOException {		final List list= new ArrayList();		final BufferedReader reader= new BufferedReader(new InputStreamReader(stream, IRefactoringSerializationConstants.OUTPUT_ENCODING));		while (reader.ready()) {			final String line= reader.readLine();			if (line != null) {				final int index= line.indexOf(DELIMITER_COMPONENT);				if (index > 0) {					try {						final long stamp= new Long(line.substring(0, index)).longValue();						if (stamp >= start && stamp <= end)							list.add(new DefaultRefactoringDescriptorProxy(unescapeString(line.substring(index + 1)), project, stamp));					} catch (NumberFormatException exception) {						// Just skip					}				}			}		}		return (RefactoringDescriptorProxy[]) list.toArray(new RefactoringDescriptorProxy[list.size()]);	}