	public InputStream getInputStream(URI uri) throws IOException {
		if(weakmap.containsKey(uri.toString())){
			return new ByteArrayInputStream(weakmap.get(uri));
		}
		try{
			BasicDBObject obj = new BasicDBObject();
			obj.put(ID, uri.toString());
			DBCursor c = col.find(obj);
			DBObject o = c.next();
			byte[] v = (byte[])o.get(DATA);
			weakmap.put(uri.toString(), v);
			return new ByteArrayInputStream(v);
		}catch(NoSuchElementException e){
			return null;
		}
	}

	public InputStream getInputStream(URI uri) throws IOException {
		byte[] cache = weakmap.get(uri.toString());
		if(cache != null){
			return new ByteArrayInputStream(cache);
		}
		try{
			BasicDBObject obj = new BasicDBObject();
			obj.put(ID, uri.toString());
			DBCursor c = col.find(obj);
			DBObject o = c.next();
			byte[] v = (byte[])o.get(DATA);
			weakmap.put(uri.toString(), v);
			return new ByteArrayInputStream(v);
		}catch(NoSuchElementException e){
			return null;
		}
	}
