if(collection != null) collection.release();
	public boolean storeBinary(User user, byte[] data, String docName,		boolean replace) throws EXistException, PermissionDeniedException, LockException {		DBBroker broker = null;		DocumentImpl doc = null;		try {			broker = brokerPool.get(user);			int p = docName.lastIndexOf('/');			if (p < 0 || p == docName.length() - 1)				throw new EXistException("Illegal document path");			String collectionName = docName.substring(0, p);			docName = docName.substring(p + 1);			Collection collection = broker.getCollection(collectionName);			if (collection == null)				throw new EXistException("Collection " + collectionName						+ " not found");			if (!replace) {				DocumentImpl old = collection.getDocument(broker, docName);				if (old != null)					throw new PermissionDeniedException(							"Old document exists and overwrite is not allowed");			}			doc = collection.addBinaryResource(broker, docName, data);		} finally {			brokerPool.release(broker);		}		documentCache.clear();		return doc != null;	}