code: public Resource retrieveResource(CaptureSearchResult result) 
  		throws ResourceNotAvailableException {
  		// extract ARC filename
  		String fileName = result.getFile();
  		if(fileName == null || fileName.length() < 1) {
  			throw new ResourceNotAvailableException("No ARC/WARC name in search result...", fileName);
  		}
  
  		String urls[];
  		try {
  			urls = db.nameToUrls(fileName);
  		} catch (IOException e1) {
  			//e1.printStackTrace();
  			throw new ResourceNotAvailableException(e1.getLocalizedMessage(), fileName);
  		}
  		if(urls == null || urls.length == 0) {
  			String msg = "Unable to locate(" + fileName + ")";
  			LOGGER.info(msg);
  			throw new ResourceNotAvailableException(msg, fileName);
  		}
  		
  		final long offset = result.getOffset();
  
  		String errMsg = "Unable to retrieve";
  		Exception origException = null;
  		
  		Resource r = null;
  		// TODO: attempt multiple threads?
  		for(String url : urls) {
  				
  			try {
  
  				r = ResourceFactory.getResource(url, offset);
  				// TODO: attempt to grab the first few KB? The underlying 
  				// 		InputStreams support mark(), so we could reset() after.
  				//      wait for now, currently this will parse HTTP headers, 
  				//      which means we've already read some
  				
  			} catch (IOException e) {
  				errMsg = url + " - " + e;
  				origException = e;
  				LOGGER.info("Unable to retrieve " + errMsg);
  			}
  			if(r != null) {
  				break;
  			}
  		}
  		if(r == null) {
  			throw new ResourceNotAvailableException(errMsg, fileName, origException);
  		}
  		return r;
  	}
docs: /* (non-Javadoc)
  @see org.archive.wayback.ResourceStore#retrieveResource(org.archive.wayback.core.SearchResult)