/** * Creates a cookie with the given name and value. * * @param name the cookie name * @param value the cookie value * @return CrawlerPack */ public CrawlerPack addCookie(String name, String value){ if( null == name ) { log.warn("addCookie: Cookie name null."); return this; } cookies.add( new Cookie("", name, value) ); return this; }
/** * Creates a cookie with the given name, value, domain attribute, * path attribute, expiration attribute, and secure attribute * * @param name the cookie name * @param value the cookie value * @param domain the domain this cookie can be sent to * @param path the path prefix for which this cookie can be sent * @param expires the {@link Date} at which this cookie expires, * or <tt>null</tt> if the cookie expires at the end * of the session * @param secure if true this cookie can only be sent over secure * connections * */ public CrawlerPack addCookie(String domain, String name, String value, String path, Date expires, boolean secure) { if( null == name ) { log.warn("addCookie: Cookie name null."); return this; } cookies.add(new Cookie(domain, name, value, path, expires, secure)); return this; }
log.warn("getFromRemote: FileSystemException=" + fse.getMessage()); remoteContent =null; }catch(IOException ioe){ log.warn("getFromRemote: IOException=" + ioe.getMessage()); remoteContent =null; }catch(StringIndexOutOfBoundsException stre){ log.warn("getFromRemote: StringIndexOutOfBoundsException=" + stre.getMessage()); log.warn("getFromRemote: uri=" + uri ); log.warn(stre.getMessage()); remoteContent =null;