遠程文件解析器

public class RemoteFileResolver
extends Object

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


一個簡單的類,允許使用 URI 和服務提供者功能從不同的地方加載文件。

概括

公共構造函數

RemoteFileResolver ()

公共方法

static IRemoteFileResolver getDefaultResolver (URI fileURI, config) getDefaultResolver (URI fileURI, config)

加載由 URI 指定的文件並將其放置在目標目錄中

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

加載由 URI 指定的文件並將其放置在目標目錄中

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

加載由 URI 指定的文件並將其放置在目標目錄中

公共構造函數

遠程文件解析器

public RemoteFileResolver ()

公共方法

獲取默認解析器

public static IRemoteFileResolver getDefaultResolver (URI fileURI, 
                 config)

加載由 URI 指定的文件並將其放置在目標目錄中

參數
fileURI URI :要加載的文件(需要確定協議)

config :用於初始化解析器的配置

退貨
IRemoteFileResolver用於為給定協議加載文件的IRemoteFileResolver對象

解析遠程文件

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

加載由 URI 指定的文件並將其放置在目標目錄中

參數
fileURI URI :要加載的文件

destDir URI : 放置加載文件的目的地

退貨
IRemoteFileResolver.ResolvedFile表示加載文件的ERROR(/File)對象

投擲
BuildRetrievalError當無法找到請求的資源時

解析遠程文件

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

加載由 URI 指定的文件並將其放置在目標目錄中

參數
fileURI URI :要加載的文件

destDir URI : 放置加載文件的目的地

resolver IRemoteFileResolver :用於解析文件的IRemoteFileResolver

退貨
IRemoteFileResolver.ResolvedFile表示加載文件的ERROR(/File)對象

投擲
BuildRetrievalError當無法找到請求的資源時