@Override
	public boolean saveFile(RMIFileBean fb, String id) throws RemoteException {
		boolean r = false;
		String host = "localhost";
		DBObject myDoc = null;
		try {
			MongoClient mongoClient = new MongoClient(host);

			DB db = mongoClient.getDB( "sdfinal" );
			
			DBCollection coll = db.getCollection("videos");
			
			BasicDBObject query = new BasicDBObject("_id", id);

			DBCursor cursor = coll.find(query);

	        try {
				if(cursor.hasNext()) {
				    myDoc = cursor.next();
					myDoc.put("name", fb.getName());
					myDoc.put("data", fb.getData());
					
					if (coll.update(query, myDoc) != null)
						r = true;
				}
	        } finally {
	            cursor.close();
	        }
		} catch (Exception e) {
			System.out.println(e);
		}
		return r;
	}