public static class DefaultIndexUpdater.FileFetcher extends java.lang.Object implements ResourceFetcher
| Modifier and Type | Field and Description |
|---|---|
private java.io.File |
basedir |
| Constructor and Description |
|---|
FileFetcher(java.io.File basedir) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(java.lang.String id,
java.lang.String url)
Connect and start transfer session
|
void |
disconnect()
Disconnect and complete transfer session
|
private java.io.File |
getFile(java.lang.String name) |
java.io.InputStream |
retrieve(java.lang.String name)
Retrieves resource as InputStream
|
void |
retrieve(java.lang.String name,
java.io.File targetFile) |
public void connect(java.lang.String id,
java.lang.String url)
throws java.io.IOException
ResourceFetcherconnect in interface ResourceFetcherjava.io.IOExceptionpublic void disconnect()
throws java.io.IOException
ResourceFetcherdisconnect in interface ResourceFetcherjava.io.IOExceptionpublic void retrieve(java.lang.String name,
java.io.File targetFile)
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOExceptionjava.io.FileNotFoundExceptionpublic java.io.InputStream retrieve(java.lang.String name)
throws java.io.IOException,
java.io.FileNotFoundException
ResourceFetcherretrieve in interface ResourceFetchername - a name of resource to retrievejava.io.IOExceptionjava.io.FileNotFoundExceptionprivate java.io.File getFile(java.lang.String name)