AndroidBuildDownloader

public class AndroidBuildDownloader
extends Object implements IFileDownloader

java.lang.Object
   ↳ com.google.android.tradefed.build.AndroidBuildDownloader


Android 빌드 API에서 파일을 가져오는 IFileDownloader

요약

필드

protected static final ConcurrentMap<String, RemoteZip> REMOTE_ZIP_CACHE

원격 경로로 색인이 생성된 원격 zip 파일의 캐시입니다.

공개 생성자

AndroidBuildDownloader()

공개 메서드

static File createTempFile(String remoteFilePath, File rootDir)

지정된 경로로 다운로드된 파일을 저장하기 위해 임시 디스크에 고유한 파일을 만듭니다.

void downloadFile(String remoteFilePath, File destFile, long startOffset, long size)

호출자가 파일의 섹션을 다운로드하여 특정 대상 파일에 저장할 수 있는 downloadFile(String,File)의 대체 형식입니다.

void downloadFile(String remoteFilePath, File destFile)

호출자가 원격 콘텐츠가 배치되어야 하는 대상 파일을 지정할 수 있는 downloadFile(String)의 대체 형식입니다.

File downloadFile(String remoteFilePath)

원격 파일을 로컬 디스크의 임시 파일로 다운로드합니다.

void downloadZippedFiles(File destDir, String remoteFilePath, List<String> includeFilters, List<String> excludeFilters)

원격 ZIP 파일에서 지정된 필터와 일치하는 파일을 다운로드합니다.

void enablePartialDownloadCache(boolean enablePartialDownloadCache)
void setMetadataCheck(boolean enableMetadataCheck)
void setResolveSymlinks(boolean resolveSymlinks)
void setUseMd5(boolean useMd5)

보호된 메서드

AndroidBuildFetcher getBuildFetcher()

AndroidBuildFetcher를 반환합니다. 아직 없는 경우 새로 만듭니다.

void setBuildEnvironment(String buildEnvironment)

필드

REMOTE_ZIP_CACHE

protected static final ConcurrentMap<String, RemoteZip> REMOTE_ZIP_CACHE

원격 경로로 색인이 생성된 원격 zip 파일의 캐시입니다.

공개 생성자

AndroidBuildDownloader

public AndroidBuildDownloader ()

공개 메서드

createTempFile

public static File createTempFile (String remoteFilePath, 
                File rootDir)

지정된 경로로 다운로드된 파일을 저장하기 위해 임시 디스크에 고유한 파일을 만듭니다.

경로의 기본 파일 이름을 기반으로 파일 이름을 구성합니다.

매개변수
remoteFilePath String: 이름을 구성할 원격 경로

rootDir File

반환
File

생성 값
BuildRetrievalError

downloadFile

public void downloadFile (String remoteFilePath, 
                File destFile, 
                long startOffset, 
                long size)

호출자가 파일의 섹션을 다운로드하여 특정 대상 파일에 저장할 수 있는 downloadFile(String,File)의 대체 형식입니다.

매개변수
remoteFilePath String: 다운로드할 파일의 원격 경로입니다. 구현별 루트를 기준으로 합니다.

destFile File: 다운로드한 콘텐츠를 배치할 파일입니다. 존재하지 않아야 합니다.

startOffset long: 원격 파일의 시작 오프셋입니다.

size long: 원격 파일에서 다운로드할 바이트 수입니다. 전체 파일을 다운로드하려면 음수 값으로 설정합니다.

생성 값
BuildRetrievalError

downloadFile

public void downloadFile (String remoteFilePath, 
                File destFile)

호출자가 원격 콘텐츠가 배치되어야 하는 대상 파일을 지정할 수 있는 downloadFile(String)의 대체 형식입니다.

매개변수
remoteFilePath String: 다운로드할 파일의 원격 경로입니다. 구현별 루트를 기준으로 합니다.

destFile File: 다운로드한 콘텐츠를 배치할 파일입니다. 존재하지 않아야 합니다.

생성 값
BuildRetrievalError

downloadFile

public File downloadFile (String remoteFilePath)

원격 파일을 로컬 디스크의 임시 파일로 다운로드합니다.

매개변수
remoteFilePath String: 다운로드할 파일의 원격 경로입니다. 구현별 루트를 기준으로 합니다.

반환
File 임시로 로컬에 다운로드된 File입니다.

생성 값
BuildRetrievalError

downloadZippedFiles

public void downloadZippedFiles (File destDir, 
                String remoteFilePath, 
                List<String> includeFilters, 
                List<String> excludeFilters)

원격 ZIP 파일에서 지정된 필터와 일치하는 파일을 다운로드합니다.

원격 zip 파일 내의 파일은 경로가 포함 필터와 일치하지만 제외 필터와 일치하지 않는 경우에만 다운로드됩니다.

매개변수
destDir File: 다운로드한 콘텐츠를 배치할 파일입니다.

remoteFilePath String: 다운로드할 파일의 원격 경로입니다. 구현별 루트를 기준으로 합니다.

includeFilters List: 일치하는 파일을 다운로드할 필터 목록입니다.

excludeFilters List: 일치하는 파일의 다운로드를 건너뛸 필터 목록입니다.

생성 값
BuildRetrievalError
IOException

enablePartialDownloadCache

public void enablePartialDownloadCache (boolean enablePartialDownloadCache)

매개변수
enablePartialDownloadCache boolean

setMetadataCheck

public void setMetadataCheck (boolean enableMetadataCheck)

매개변수
enableMetadataCheck boolean

setResolveSymlinks

public void setResolveSymlinks (boolean resolveSymlinks)

매개변수
resolveSymlinks boolean

setUseMd5

public void setUseMd5 (boolean useMd5)

매개변수
useMd5 boolean

보호된 메서드

getBuildFetcher

protected AndroidBuildFetcher getBuildFetcher ()

AndroidBuildFetcher를 반환합니다. 아직 없는 경우 새로 만듭니다.

반환
AndroidBuildFetcher

생성 값
GeneralSecurityException
IOException

setBuildEnvironment

protected void setBuildEnvironment (String buildEnvironment)

매개변수
buildEnvironment String