IFile다운로더

public interface IFileDownloader

com.android.tradefed.build.IFileDownloader


원격 파일을 다운로드하기 위한 인터페이스입니다.

요약

공개 메소드

default void acquireDownloadPermit ()

동시성 제한이 지원되는 경우 다운로드 허가를 받으세요.

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

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

abstract void downloadFile (String relativeRemotePath, File destFile)

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

abstract File downloadFile (String remoteFilePath)

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

default void downloadZippedFiles (File destDir, String remoteFilePath, includeFilters, excludeFilters) downloadZippedFiles (File destDir, String remoteFilePath, includeFilters, excludeFilters) downloadZippedFiles (File destDir, String remoteFilePath, includeFilters, excludeFilters)

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

default boolean isFresh (File localFile, String remoteFilePath)

로컬 파일의 최신성을 확인하세요.

default void releaseDownloadPermit ()

동시성 제한이 지원되는 경우 다운로드 허가를 해제하세요.

공개 메소드

획득다운로드허가

public void acquireDownloadPermit ()

동시성 제한이 지원되는 경우 다운로드 허가를 받으세요.

다운로드파일

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

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

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

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

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

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

던지기
BuildRetrievalError 파일을 다운로드할 수 없는 경우

다운로드파일

public abstract void downloadFile (String relativeRemotePath, 
                File destFile)

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

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

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

던지기
BuildRetrievalError 파일을 다운로드할 수 없는 경우

다운로드파일

public abstract File downloadFile (String remoteFilePath)

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

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

보고
File 임시 로컬 다운로드 ERROR(/File) .

던지기
BuildRetrievalError 파일을 다운로드할 수 없는 경우

다운로드압축파일

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

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

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

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

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

includeFilters : 일치하는 파일을 다운로드하기 위한 필터 목록입니다.

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

던지기
BuildRetrievalError 파일을 다운로드할 수 없는 경우.
IO예외

신선하다

public boolean isFresh (File localFile, 
                String remoteFilePath)

로컬 파일의 최신성을 확인하세요. 로컬 파일이 원격 파일과 동일하면 최신 파일입니다. 그렇지 않으면 로컬 파일이 오래되었습니다. 주로 캐시에 사용됩니다. 기본 구현은 항상 true를 반환하므로 파일이 변경 불가능한 경우 최신성을 확인할 필요가 없습니다.

매개변수
localFile File : 로컬 파일.

remoteFilePath String : 원격 파일 경로.

보고
boolean 로컬 파일이 최신이면 참이고, 그렇지 않으면 거짓입니다.

던지기
com.android.tradefed.build.BuildRetrievalError
BuildRetrievalError

릴리스다운로드허가

public void releaseDownloadPermit ()

동시성 제한이 지원되는 경우 다운로드 허가를 해제하세요.

,

IFile다운로더

public interface IFileDownloader

com.android.tradefed.build.IFileDownloader


원격 파일을 다운로드하기 위한 인터페이스입니다.

요약

공개 메소드

default void acquireDownloadPermit ()

동시성 제한이 지원되는 경우 다운로드 허가를 받으세요.

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

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

abstract void downloadFile (String relativeRemotePath, File destFile)

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

abstract File downloadFile (String remoteFilePath)

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

default void downloadZippedFiles (File destDir, String remoteFilePath, includeFilters, excludeFilters) downloadZippedFiles (File destDir, String remoteFilePath, includeFilters, excludeFilters) downloadZippedFiles (File destDir, String remoteFilePath, includeFilters, excludeFilters)

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

default boolean isFresh (File localFile, String remoteFilePath)

로컬 파일의 최신성을 확인하세요.

default void releaseDownloadPermit ()

동시성 제한이 지원되는 경우 다운로드 허가를 해제하세요.

공개 메소드

획득다운로드허가

public void acquireDownloadPermit ()

동시성 제한이 지원되는 경우 다운로드 허가를 받으세요.

다운로드파일

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

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

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

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

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

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

던지기
BuildRetrievalError 파일을 다운로드할 수 없는 경우

다운로드파일

public abstract void downloadFile (String relativeRemotePath, 
                File destFile)

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

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

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

던지기
BuildRetrievalError 파일을 다운로드할 수 없는 경우

다운로드파일

public abstract File downloadFile (String remoteFilePath)

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

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

보고
File 임시 로컬 다운로드 ERROR(/File) .

던지기
BuildRetrievalError 파일을 다운로드할 수 없는 경우

다운로드압축파일

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

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

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

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

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

includeFilters : 일치하는 파일을 다운로드하기 위한 필터 목록입니다.

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

던지기
BuildRetrievalError 파일을 다운로드할 수 없는 경우.
IO예외

신선하다

public boolean isFresh (File localFile, 
                String remoteFilePath)

로컬 파일의 최신성을 확인하세요. 로컬 파일이 원격 파일과 동일하면 최신 파일입니다. 그렇지 않으면 로컬 파일이 오래되었습니다. 주로 캐시에 사용됩니다. 기본 구현은 항상 true를 반환하므로 파일이 변경 불가능한 경우 최신성을 확인할 필요가 없습니다.

매개변수
localFile File : 로컬 파일.

remoteFilePath String : 원격 파일 경로.

보고
boolean 로컬 파일이 최신이면 참이고, 그렇지 않으면 거짓입니다.

던지기
com.android.tradefed.build.BuildRetrievalError
BuildRetrievalError

릴리스다운로드허가

public void releaseDownloadPermit ()

동시성 제한이 지원되는 경우 다운로드 허가를 해제하세요.