code: public I_CmsHistoryResource readResource(CmsDbContext dbc, CmsResource resource, int version) throws CmsException {
  
          Iterator<I_CmsHistoryResource> itVersions = getHistoryDriver(dbc).readAllAvailableVersions(
              dbc,
              resource.getStructureId()).iterator();
          while (itVersions.hasNext()) {
              I_CmsHistoryResource histRes = itVersions.next();
              if (histRes.getVersion() == version) {
                  return histRes;
              }
          }
          throw new CmsVfsResourceNotFoundException(
              org.opencms.db.generic.Messages.get().container(
                  org.opencms.db.generic.Messages.ERR_HISTORY_FILE_NOT_FOUND_1,
                  resource.getStructureId()));
      }
docs: Reads an historical resource entry for the given resource and with the given version number.<p>
  
  @param dbc the current db context
  @param resource the resource to be read
  @param version the version number to retrieve
  
  @return the resource that was read
  
  @throws CmsException if the resource could not be read for any reason
  
  @see CmsObject#restoreResourceVersion(CmsUUID, int)
  @see CmsObject#readResource(CmsUUID, int)