Package fr.eolya.crawler.cache

Examples of fr.eolya.crawler.cache.DocumentCacheItem


                      sendUrl = getUrlWithoutIgnoredFields(sendUrl);
                      if (docCache==null) {
                        dh.sendDoc(new Integer(currentUrlItem.getSourceId()).toString(), sendUrl, new Integer(src.getAccountId()).toString(), urlLoader.getStream(), params, metas, src.getExtra(), this);                       
                      } else {
                        docCache.put(sendUrl, urlLoader.getStream(), 0, params, metas, src.getExtra())
                        DocumentCacheItem cacheItem = docCache.get(sendUrl);
                        dh.sendDoc(new Integer(currentUrlItem.getSourceId()).toString(), sendUrl, new Integer(src.getAccountId()).toString(), cacheItem.streamData, params, metas, src.getExtra(), this);                                               
                      }
                      //dh.sendDoc(new Integer(currentUrlItem.getSourceId()).toString(), sendUrl, new Integer(src.getAccountId()).toString(), urlLoader.getStream(), params, metas, src.getExtra(), this);
                      //if (docCache!=null) docCache.put(sendUrl, urlLoader.getStream(), 0, params, metas, src.getExtra());                     
                    }
View Full Code Here


      }

      InputStream inputSource = new ByteArrayInputStream(doc.get("content_base64").toString().getBytes());
      InputStream streamData = new Base64.InputStream(inputSource, Base64.DECODE);

      return new DocumentCacheItem( itemId, streamData, params, metas, extra);
    } catch (IOException e) {
      e.printStackTrace();
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of fr.eolya.crawler.cache.DocumentCacheItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.