fileLock = fileStream.getChannel().tryLock();
try { fileLock = fileStream.getChannel().tryLock(); } catch (IOException ioe) {  if (BasicLocation.DEBUG) { String basicMessage = EclipseAdaptorMsg.formatter.getString("location.cannotLock", lockFile); FrameworkLogEntry basicEntry = new FrameworkLogEntry(EclipseAdaptor.FRAMEWORK_SYMBOLICNAME, basicMessage, 0, ioe, null); EclipseAdaptor.getDefault().getFrameworkLog().log(basicEntry); }  String specificMessage = EclipseAdaptorMsg.formatter.getString("location.cannotLockNIO", new Object[] {lockFile, ioe.getMessage(), BasicLocation.PROP_OSGI_LOCKING}); throw new IOException(specificMessage); }
	public synchronized boolean lock() throws IOException {		fileStream = new FileOutputStream(lockFile, true);		fileLock = fileStream.getChannel().tryLock();		if (fileLock != null)			return true;		fileStream.close();		fileStream = null;		return false;	}