output.write(buffer.toString().getBytes());
output.write(buffer.toString().getBytes("utf-8"));
	private static void removeIndexEntry(final IFileStore file, final long stamp, final IProgressMonitor monitor) throws CoreException, IOException {		InputStream input= null;		try {			monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_updating_history, 4);			if (file.fetchInfo().exists()) {				input= new DataInputStream(new BufferedInputStream(file.openInputStream(EFS.NONE, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL))));				if (input != null) {					final String value= new Long(stamp).toString();					final BufferedReader reader= new BufferedReader(new InputStreamReader(input));					final StringBuffer buffer= new StringBuffer();					while (reader.ready()) {						final String line= reader.readLine();						if (!line.startsWith(value)) {							buffer.append(line);							buffer.append('\n');						}					}					monitor.worked(1);					try {						input.close();						input= null;					} catch (IOException exception) {						// Do nothing					}					OutputStream output= null;					try {						file.getParent().mkdir(EFS.NONE, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));						output= new BufferedOutputStream(file.openOutputStream(EFS.NONE, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)));						output.write(buffer.toString().getBytes());					} finally {						if (output != null) {							try {								output.close();							} catch (IOException exception) {								// Do nothing							}						}					}				}			}		} finally {			monitor.done();			try {				if (input != null)					input.close();			} catch (IOException exception) {				// Do nothing			}		}	}