중앙 디렉터리정보

public final class CentralDirectoryInfo
extends Object

java.lang.Object
com.android.tradefed.util.zip.CentralDirectoryInfo


CentralDirectoryInfo는 zip 파일 내의 파일/폴더 정보를 포함하는 클래스입니다.

전체 zip 파일 형식: [로컬 파일 헤더 + 압축 데이터 [+ 확장 로컬 헤더]?]* [중앙 디렉터리]* [중앙 디렉터리 기록의 끝]

자세한 내용은 다음 링크를 참조하세요: https://en.wikipedia.org/wiki/Zip_(file_format)

요약

공개 생성자

CentralDirectoryInfo (byte[] data, int startOffset)

zip 파일 내의 파일 항목 정보를 수집하는 생성자입니다.

CentralDirectoryInfo (byte[] data, int startOffset, boolean useZip64)

zip 파일 내의 파일 항목 정보를 수집하는 생성자입니다.

보호된 생성자

CentralDirectoryInfo ()

단위 테스트에 사용되는 기본 생성자입니다.

공개 메소드

boolean equals (Object o)
int getCompressedSize ()

압축된 크기를 가져옵니다.

int getCompressionMethod ()

압축 방법을 가져옵니다.

long getCrc ()

파일의 CRC를 가져옵니다.

long getExternalFileAttributes ()

외부 파일 속성을 가져옵니다.

int getExtraFieldLength ()

추가 필드 길이를 가져옵니다.

int getFileCommentLength ()

파일 주석 길이를 가져옵니다.

String getFileName ()

상대 경로를 포함한 파일 이름을 가져옵니다.

int getFileNameLength ()

파일 이름 길이를 가져옵니다.

int getFilePermission ()

외부 파일 속성의 마지막 9비트에 저장된 Linux 파일 권한을 가져옵니다.

int getInfoSize ()

중앙 디렉터리 항목의 크기를 가져옵니다.

int getInternalFileAttributes ()

내부 파일 속성을 가져옵니다.

long getLocalHeaderOffset ()

로컬 파일 헤더 항목의 오프셋을 가져옵니다.

long getUncompressedSize ()

압축되지 않은 크기를 가져옵니다.

int hashCode ()
void setCompressedSize (long compressionSize)

압축 크기를 설정합니다.

void setCompressionMethod (int compressionMethod)

압축 방식을 설정합니다.

void setCrc (long crc)

파일의 CRC를 설정합니다.

void setExternalFileAttributes (long externalFileAttributes)

외부 파일 속성을 설정합니다.

void setExtraFieldLength (int extraFieldLength)

추가 필드 길이를 설정합니다.

void setFileCommentLength (int fileCommentLength)

파일 주석 길이를 설정합니다.

void setFileName (String fileName)

상대경로를 포함한 파일명을 설정합니다.

void setFileNameLength (int fileNameLength)

파일 이름 길이를 설정합니다.

void setInternalFileAttributes (int internalFileAttributes)

내부 파일 속성을 설정합니다.

void setLocalHeaderOffset (long localHeaderOffset)

로컬 파일 헤더 항목의 오프셋을 설정합니다.

void setUncompressedSize (long uncompressedSize)

압축되지 않은 크기를 설정합니다.

String toString ()

공개 생성자

중앙 디렉터리정보

public CentralDirectoryInfo (byte[] data, 
                int startOffset)

zip 파일 내의 파일 항목 정보를 수집하는 생성자입니다.

매개변수
data byte : 파일 항목의 정보를 포함하는 데이터의 byte[] .

startOffset int : 정보 블록의 시작 오프셋입니다.

던지기
IO예외

중앙 디렉터리정보

public CentralDirectoryInfo (byte[] data, 
                int startOffset, 
                boolean useZip64)

zip 파일 내의 파일 항목 정보를 수집하는 생성자입니다.

매개변수
data byte : 파일 항목의 정보를 포함하는 데이터의 byte[] .

startOffset int : 정보 블록의 시작 오프셋입니다.

useZip64 boolean : 부분 다운로드에서 zip64 형식을 지원하는 부울입니다.

던지기
IO예외

보호된 생성자

중앙 디렉터리정보

protected CentralDirectoryInfo ()

단위 테스트에 사용되는 기본 생성자입니다.

공개 메소드

같음

public boolean equals (Object o)

매개변수
o Object

보고
boolean

getCompressedSize

public int getCompressedSize ()

압축된 크기를 가져옵니다.

보고
int

getCompression메소드

public int getCompressionMethod ()

압축 방법을 가져옵니다.

반품
int

getCrc

public long getCrc ()

파일의 CRC를 가져옵니다.

보고
long

getExternalFileAttributes

public long getExternalFileAttributes ()

외부 파일 속성을 가져옵니다.

보고
long

getExtraFieldLength

public int getExtraFieldLength ()

추가 필드 길이를 가져옵니다.

보고
int

getFileCommentLength

public int getFileCommentLength ()

파일 주석 길이를 가져옵니다.

보고
int

파일 이름 가져오기

public String getFileName ()

상대 경로를 포함한 파일 이름을 가져옵니다.

반품
String

getFileName길이

public int getFileNameLength ()

파일 이름 길이를 가져옵니다.

보고
int

getFilePermission

public int getFilePermission ()

외부 파일 속성의 마지막 9비트에 저장된 Linux 파일 권한을 가져옵니다.

보고
int

getInfo크기

public int getInfoSize ()

중앙 디렉터리 항목의 크기를 가져옵니다.

보고
int

getInternalFileAttributes

public int getInternalFileAttributes ()

내부 파일 속성을 가져옵니다.

보고
int

getLocalHeaderOffset

public long getLocalHeaderOffset ()

로컬 파일 헤더 항목의 오프셋을 가져옵니다.

보고
long

압축되지 않은 크기 가져오기

public long getUncompressedSize ()

압축되지 않은 크기를 가져옵니다.

반품
long

해시 코드

public int hashCode ()

보고
int

압축 크기 설정

public void setCompressedSize (long compressionSize)

압축 크기를 설정합니다.

매개변수
compressionSize long

압축 방법 설정

public void setCompressionMethod (int compressionMethod)

압축 방식을 설정합니다.

매개변수
compressionMethod int

setCrc

public void setCrc (long crc)

파일의 CRC를 설정합니다.

매개변수
crc long

setExternalFileAttributes

public void setExternalFileAttributes (long externalFileAttributes)

외부 파일 속성을 설정합니다.

매개변수
externalFileAttributes long

setExtraFieldLength

public void setExtraFieldLength (int extraFieldLength)

추가 필드 길이를 설정합니다.

매개변수
extraFieldLength int

setFileCommentLength

public void setFileCommentLength (int fileCommentLength)

파일 주석 길이를 설정합니다.

매개변수
fileCommentLength int

파일 이름 설정

public void setFileName (String fileName)

상대경로를 포함한 파일명을 설정합니다.

매개변수
fileName String

setFileName길이

public void setFileNameLength (int fileNameLength)

파일 이름 길이를 설정합니다.

매개변수
fileNameLength int

setInternalFileAttributes

public void setInternalFileAttributes (int internalFileAttributes)

내부 파일 속성을 설정합니다.

매개변수
internalFileAttributes int

setLocalHeaderOffset

public void setLocalHeaderOffset (long localHeaderOffset)

로컬 파일 헤더 항목의 오프셋을 설정합니다.

매개변수
localHeaderOffset long

압축되지 않은 크기 설정

public void setUncompressedSize (long uncompressedSize)

압축되지 않은 크기를 설정합니다.

매개변수
uncompressedSize long

toString

public String toString ()

반품
String