public static Table Open(Options options, _RandomAccessFile file, long size) {
		Table table = null;
		if (size < Footer.kEncodedLength) {
			// throw new Exception("file is too short to be an sstable");
			return null;
		}

		byte[] footer_space = new byte[Footer.kEncodedLength];
		Slice footer_input = new Slice();
		footer_space = file.Read(size - Footer.kEncodedLength,
				Footer.kEncodedLength, footer_input);
		ByteCollection footer_input_bc = new ByteCollection(footer_space, 0);

		Footer footer = new Footer();
		Status s = footer.DecodeFrom(footer_input_bc);
		if (!s.ok())
			return null;

		// Read the index block
		Block index_block = new Block(null, 0, false);
		if (s.ok()) {
			@SuppressWarnings("unused")
			boolean may_cache = false; // Ignored result
			try {
				may_cache = Block.ReadBlock(file, new ReadOptions(),
						footer.index_handle(), index_block);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		if (s.ok()) {
			// We've successfully read the footer and the index block: we're
			// ready to serve requests.
			Rep rep = new Rep();
			rep.options = options;
			rep.file = file;
			rep.metaindex_handle = footer.metaindex_handle();
			rep.index_block = index_block;
			rep.cache_id = (options.block_cache != null ? options.block_cache
					.NewId() : 0);
			table = new Table(rep);
		} else {
			if (index_block != null)
				index_block = null;
		}
		return table;
	}