private int readTypeSpecTable
			(ResTable_TypeSpec typeSpecTable,
			byte[] data,
			int offset) throws IOException {
		typeSpecTable.id = readUInt8(data, offset);
		offset += 1;
		
		typeSpecTable.res0 = readUInt8(data, offset);
		offset += 1;
		if (typeSpecTable.res0 != 0)
			throw new RuntimeException("File format violation, res0 was not zero");
		
		typeSpecTable.res1 = readUInt16(data, offset);
		offset += 2;
		if (typeSpecTable.res1 != 0)
			throw new RuntimeException("File format violation, res1 was not zero");
		
		typeSpecTable.entryCount = readUInt32(data, offset);
		offset += 4;

		return offset;
	}