org.archive.wayback.liveweb
Class URLCacher
java.lang.Object
org.archive.wayback.liveweb.URLCacher
public class URLCacher
- extends java.lang.Object
Class for performing an HTTP GET request, and storing all related info
required to create a valid ARC Record. This info is also actually stored in
an ARC file via an ARCWriter. This should leverage more Heritrix fetcher code
but because the Heritrix settings system is tightly coupled with the fetcher
code, we'll try to limp by with this class until it gets untangled.
- Version:
- $Date$, $Revision$
- Author:
- brad
|
Field Summary |
protected java.io.File |
tmpDir
|
|
Method Summary |
org.archive.io.arc.ARCLocation |
cache(ARCCacheDirectory cache,
java.lang.String urlString)
Retrieve urlString, and store using ARCWriter, returning
ARCLocation where the document was stored. |
java.lang.String |
getTmpDir()
|
static void |
main(java.lang.String[] args)
|
void |
setTmpDir(java.lang.String tmpDir)
|
protected org.archive.wayback.liveweb.URLCacher.ExtendedGetMethod |
urlToFile(java.lang.String urlString,
java.io.File file)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tmpDir
protected java.io.File tmpDir
URLCacher
public URLCacher()
urlToFile
protected org.archive.wayback.liveweb.URLCacher.ExtendedGetMethod urlToFile(java.lang.String urlString,
java.io.File file)
throws LiveDocumentNotAvailableException,
org.apache.commons.httpclient.URIException,
java.io.IOException
- Throws:
LiveDocumentNotAvailableException
org.apache.commons.httpclient.URIException
java.io.IOException
cache
public org.archive.io.arc.ARCLocation cache(ARCCacheDirectory cache,
java.lang.String urlString)
throws LiveDocumentNotAvailableException,
java.io.IOException,
org.apache.commons.httpclient.URIException
- Retrieve urlString, and store using ARCWriter, returning
ARCLocation where the document was stored.
- Parameters:
cache - urlString -
- Returns:
- ARCLocation where document was stored
- Throws:
LiveDocumentNotAvailableException
org.apache.commons.httpclient.URIException
java.io.IOException - if something internal went wrong.
main
public static void main(java.lang.String[] args)
- Parameters:
args -
getTmpDir
public java.lang.String getTmpDir()
- Returns:
- the tmpDir
setTmpDir
public void setTmpDir(java.lang.String tmpDir)
- Parameters:
tmpDir - the tmpDir to set
Copyright © 2005-2009 Internet Archive. All Rights Reserved.