타루틸
public class TarUtil
extends Object
java.lang.객체 |
↳ | com.android.tradefed.util.TarUtil |
tar 파일을 조작하는 유틸리티. tar 지원을 제공하기 위해 commons-compress를 래핑합니다.
요약
공개 메서드 |
---|
static void | extractAndLog (ITestLogger listener, File targzFile, String baseName) tar gz 파일과 그 내용을 추출하여 기자에게 기록하는 도우미 |
static File | extractTarGzipToTemp (File targzFile, String nameHint) tar.gz 파일의 압축을 풀고 임시 디렉토리에 압축을 풉니다. |
static File | gzip (File inputFile) 파일을 gzip(.gz)하는 유틸리티 기능. |
static boolean | isGzip (File file) 파일이 gzip인지 확인합니다. |
static File | unGzip (File inputFile, File outputDir) 파일 압축 해제: tar.gz 파일은 tar 파일이 됩니다. |
static | unTar (File inputFile, File outputDir) tar 파일을 디렉토리로 압축을 풉니다. |
static | unTar (File inputFile, File outputDir, fileNames) unTar (File inputFile, File outputDir, fileNames) tar 파일을 디렉토리로 풉니다. |
공개 생성자
공개 메서드
추출 및 로그
public static void extractAndLog (ITestLogger listener,
File targzFile,
String baseName)
tar gz 파일과 그 내용을 추출하여 기자에게 기록하는 도우미
매개변수 |
---|
listener | ITestLogger 다음 ITestLogger 어디에 로그 파일을합니다. |
targzFile | File 다음의 tar.gz ERROR(/File) 의 내용 로그를 필요로한다. |
baseName | String : 파일이 발견 될 아래의 기본 이름. |
public static File extractTarGzipToTemp (File targzFile,
String nameHint)
tar.gz 파일의 압축을 풀고 임시 디렉토리에 압축을 풉니다.
매개변수 |
---|
targzFile | File : 추출물에 tar.gz 파일. |
nameHint | String : 임시 디렉토리의 접두사. |
던지다 |
---|
| FileNotFoundException |
gzip
public static File gzip (File inputFile)
파일을 gzip(.gz)하는 유틸리티 기능. .gz 확장자가 기본 파일 이름에 추가됩니다.
isGzip
public static boolean isGzip (File file)
파일이 gzip인지 확인합니다.
매개변수 |
---|
file | File : 파일 확인 할 수 있습니다. |
보고 |
---|
boolean | 파일이 gzip인지 여부. |
압축 해제
public static File unGzip (File inputFile,
File outputDir)
파일 압축 해제: tar.gz 파일은 tar 파일이 됩니다.
매개변수 |
---|
inputFile | File 다음 ERROR(/File) 과 gzip |
outputDir | File 다음 ungzipped 파일을 두는 디렉토리. |
던지다 |
---|
| FileNotFoundException |
언타르
public static unTar (File inputFile,
File outputDir)
tar 파일을 디렉토리로 압축을 풉니다. tar.gz의 파일 요구가되게 unGzip(File, File)
첫째.
매개변수 |
---|
inputFile | File : 추출물에 tar 파일 |
outputDir | File : 디렉토리가 어디에서 추출 된 파일을 넣어. |
던지다 |
---|
| FileNotFoundException |
언타르
public static unTar (File inputFile,
File outputDir,
fileNames)
tar 파일을 디렉토리로 압축을 풉니다. tar.gz의 파일 요구가되게 unGzip(File, File)
첫째.
매개변수 |
---|
inputFile | File : 추출물에 tar 파일 |
outputDir | File : 디렉토리가 어디에서 추출 된 파일을 넣어. |
fileNames | : tar에서 추출할 파일입니다. |
던지다 |
---|
| FileNotFoundException |