public class FlexResourceStore extends Object implements ResourceStore
Modifier and Type | Class and Description |
---|---|
static class |
FlexResourceStore.PathIndex |
static class |
FlexResourceStore.PrefixLookup |
static interface |
FlexResourceStore.SourceResolver |
Modifier and Type | Field and Description |
---|---|
protected org.archive.format.gzip.zipnum.ZipNumBlockLoader |
blockLoader |
protected String |
customHeader |
protected boolean |
failOnFirstUnavailable |
protected List<FlexResourceStore.SourceResolver> |
sources |
Constructor and Description |
---|
FlexResourceStore() |
Modifier and Type | Method and Description |
---|---|
org.archive.format.gzip.zipnum.ZipNumBlockLoader |
getBlockLoader() |
String |
getCustomHeader() |
Resource |
getResource(String path,
CaptureSearchResult result) |
List<FlexResourceStore.SourceResolver> |
getSources() |
boolean |
isFailOnFirstUnavailable() |
protected Resource |
loadResource(String path,
InputStream is) |
Resource |
retrieveResource(CaptureSearchResult result)
Transform a CaptureSearchResult into a Resource
|
void |
setBlockLoader(org.archive.format.gzip.zipnum.ZipNumBlockLoader blockLoader) |
void |
setCustomHeader(String customHeader) |
void |
setFailOnFirstUnavailable(boolean failOnFirstUnavailable) |
void |
setSources(List<FlexResourceStore.SourceResolver> sources) |
void |
shutdown()
Release any resources used by this ResourceIndex cleanly
|
protected org.archive.format.gzip.zipnum.ZipNumBlockLoader blockLoader
protected String customHeader
protected List<FlexResourceStore.SourceResolver> sources
protected boolean failOnFirstUnavailable
public org.archive.format.gzip.zipnum.ZipNumBlockLoader getBlockLoader()
public void setBlockLoader(org.archive.format.gzip.zipnum.ZipNumBlockLoader blockLoader)
public String getCustomHeader()
public void setCustomHeader(String customHeader)
public List<FlexResourceStore.SourceResolver> getSources()
public void setSources(List<FlexResourceStore.SourceResolver> sources)
public boolean isFailOnFirstUnavailable()
public void setFailOnFirstUnavailable(boolean failOnFirstUnavailable)
public Resource retrieveResource(CaptureSearchResult result) throws ResourceNotAvailableException
ResourceStore
retrieveResource
in interface ResourceStore
result
- CaptureSearchResult which should be retrievedResourceNotAvailableException
- if the resource was unavailable
(down host, corrupted files, etc)public Resource getResource(String path, CaptureSearchResult result) throws IOException, ResourceNotAvailableException
protected Resource loadResource(String path, InputStream is) throws IOException, ResourceNotAvailableException
public void shutdown() throws IOException
ResourceStore
shutdown
in interface ResourceStore
IOException
- for usual causesCopyright © 2005–2015 IIPC. All rights reserved.