org.archive.wayback.resourcestore.resourcefile
Class ResourceFactory

java.lang.Object
  extended by org.archive.wayback.resourcestore.resourcefile.ResourceFactory

public class ResourceFactory
extends java.lang.Object

Static factory class for constructing ARC/WARC Resources from File/URL + offset.

Version:
$Date$, $Revision$
Author:
brad

Constructor Summary
ResourceFactory()
           
 
Method Summary
static Resource ARCArchiveRecordToResource(org.archive.io.ArchiveRecord rec, org.archive.io.arc.ARCReader reader)
           
static Resource getResource(java.io.File file, long offset)
           
static Resource getResource(java.lang.String urlOrPath, long offset)
           
static Resource getResource(java.net.URL url, long offset)
           
static Resource WARCArchiveRecordToResource(org.archive.io.ArchiveRecord rec, org.archive.io.warc.WARCReader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFactory

public ResourceFactory()
Method Detail

getResource

public static Resource getResource(java.lang.String urlOrPath,
                                   long offset)
                            throws java.io.IOException,
                                   ResourceNotAvailableException
Throws:
java.io.IOException
ResourceNotAvailableException

getResource

public static Resource getResource(java.io.File file,
                                   long offset)
                            throws java.io.IOException,
                                   ResourceNotAvailableException
Throws:
java.io.IOException
ResourceNotAvailableException

getResource

public static Resource getResource(java.net.URL url,
                                   long offset)
                            throws java.io.IOException,
                                   ResourceNotAvailableException
Throws:
java.io.IOException
ResourceNotAvailableException

ARCArchiveRecordToResource

public static Resource ARCArchiveRecordToResource(org.archive.io.ArchiveRecord rec,
                                                  org.archive.io.arc.ARCReader reader)
                                           throws ResourceNotAvailableException,
                                                  java.io.IOException
Throws:
ResourceNotAvailableException
java.io.IOException

WARCArchiveRecordToResource

public static Resource WARCArchiveRecordToResource(org.archive.io.ArchiveRecord rec,
                                                   org.archive.io.warc.WARCReader reader)
                                            throws ResourceNotAvailableException,
                                                   java.io.IOException
Throws:
ResourceNotAvailableException
java.io.IOException


Copyright © 2005-2009 Internet Archive. All Rights Reserved.