org.archive.wayback.liveweb
Class URLtoARCCacher
java.lang.Object
org.archive.wayback.liveweb.URLtoARCCacher
public class URLtoARCCacher
- extends Object
Takes an input URL String argument, downloads, stores in an ARCWriter,
and returns a FileRegion consisting of the compressed ARCRecord containing
the response, or a forged, "fake error response" ARCRecord which can be
used to send the content to an OutputStream.
- Author:
- brad
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URLtoARCCacher
public URLtoARCCacher()
cacheURL
public FileRegion cacheURL(String url,
ARCCacheDirectory cache)
throws IOException,
org.apache.commons.httpclient.URIException
- Parameters:
url - to cachecache - ARCCacheDirectory for storing result or faked result
- Returns:
- FileRegion of compressed byte range for ARCRecord.
- Throws:
IOException - for the usual reasons
org.apache.commons.httpclient.URIException - if url argument isn't really an URL..
getRecorderCacheDir
public String getRecorderCacheDir()
- Returns:
- the recorderCacheDir
setRecorderCacheDir
public void setRecorderCacheDir(String recorderCacheDirPath)
- Parameters:
recorderCacheDirPath - the recorderCacheDir to set
getBackingFileBase
public String getBackingFileBase()
- Returns:
- the backingFileBase
setBackingFileBase
public void setBackingFileBase(String backingFileBase)
- Parameters:
backingFileBase - the backingFileBase to set
getUserAgent
public String getUserAgent()
- Returns:
- the userAgent
setUserAgent
public void setUserAgent(String userAgent)
- Parameters:
userAgent - the userAgent to set
getConnectionTimeoutMS
public int getConnectionTimeoutMS()
- Returns:
- the connectionTimeoutMS
setConnectionTimeoutMS
public void setConnectionTimeoutMS(int connectionTimeoutMS)
- Parameters:
connectionTimeoutMS - the connectionTimeoutMS to set
getSocketTimeoutMS
public int getSocketTimeoutMS()
- Returns:
- the socketTimeoutMS
setSocketTimeoutMS
public void setSocketTimeoutMS(int socketTimeoutMS)
- Parameters:
socketTimeoutMS - the socketTimeoutMS to set
Copyright © 2005-2011 Internet Archive. All Rights Reserved.