RemoteFileResolver

public class RemoteFileResolver
extends Object

java.lang.Object
   ↳ com.android.tradefed.config.RemoteFileResolver


A simple class that allows one to load files from a variety of places using URIs and the service provider functionality.

Summary

Public constructors

RemoteFileResolver()

Public methods

static IRemoteFileResolver getDefaultResolver(URI fileURI, config)

Load a file specified by a URI and place it in the destination directory

static IRemoteFileResolver.ResolvedFile resolveRemoteFile(URI fileURI, URI destDir)

Load a file specified by a URI and place it in the destination directory

static IRemoteFileResolver.ResolvedFile resolveRemoteFile(URI fileURI, URI destDir, IRemoteFileResolver resolver)

Load a file specified by a URI and place it in the destination directory

Public constructors

RemoteFileResolver

public RemoteFileResolver ()

Public methods

getDefaultResolver

public static IRemoteFileResolver getDefaultResolver (URI fileURI, 
                 config)

Load a file specified by a URI and place it in the destination directory

Parameters
fileURI URI: the file to load (needed to determine protocol)

config : the config with which to initialize the resolver

Returns
IRemoteFileResolver a IRemoteFileResolver object to load files for the given protocol

resolveRemoteFile

public static IRemoteFileResolver.ResolvedFile resolveRemoteFile (URI fileURI, 
                URI destDir)

Load a file specified by a URI and place it in the destination directory

Parameters
fileURI URI: the file to load

destDir URI: the destination to place the loaded file

Returns
IRemoteFileResolver.ResolvedFile a ERROR(/File) object representing the loaded file

Throws
BuildRetrievalError when the requested resource cannot be located

resolveRemoteFile

public static IRemoteFileResolver.ResolvedFile resolveRemoteFile (URI fileURI, 
                URI destDir, 
                IRemoteFileResolver resolver)

Load a file specified by a URI and place it in the destination directory

Parameters
fileURI URI: the file to load

destDir URI: the destination to place the loaded file

resolver IRemoteFileResolver: the IRemoteFileResolver to use to resolve the file

Returns
IRemoteFileResolver.ResolvedFile a ERROR(/File) object representing the loaded file

Throws
BuildRetrievalError when the requested resource cannot be located