public Hash[] readHash(long hash) throws IOException {
		processQueue();
		Hash RAMHash = RAMMap.get(hash);
		if (RAMHash != null) {
			Hash[] single = new Hash[1];
			single[0] = RAMHash;
			return single;
		}
		int fileId = FAT.get(hash);
		if (fileId == -1) {
			return null;
		}
		fileSync.lock();
		try {
			File f = getFile(fileId);
			if (!f.exists() || f.isDirectory()) {
				return null;
			}
			FileInputStream fis = new FileInputStream(f);
			try {
				GZIPInputStream gis = new GZIPInputStream(fis);
				DataInputStream dis = new DataInputStream(gis);
				int entryCount = dis.readInt();
				long[] entries = new long[entryCount];
				for (int i = 0; i < entries.length; i++) {
					entries[i] = dis.readLong();
				}
				byte[][] hashData = new byte[entryCount][];
				for (int i = 0; i < entries.length; i++) {
					int length = dis.readInt();
					byte[] data = new byte[length];
					dis.readFully(data);
					hashData[i] = data;
				}
				Hash[] hashes = new Hash[entries.length];
				for (int i = 0; i < entries.length; i++) {
					Hash h = new Hash(hashData[i]);
					if (h.getHash() != entries[i]) {
						throw new IOException("Hash of data does not match hash given in entry list");
					}
					hashes[i] = h;
				}
				return hashes;
			} finally {
				if (fis != null) {
					fis.close();
				}
			}
		} finally {
			fileSync.unlock();
		}
	}