중앙 디렉터리 정보

public final class CentralDirectoryInfo
extends Object

java.lang.Object의 클래스
   ↳ com.android.tradefed.util.zip.CentralDirectoryInfo


CentralDirectoryInfo는 ZIP 파일 안에 있는 파일/폴더 정보를 포함하는 클래스입니다.

전체 zipfile 형식: [로컬 파일 헤더 + 압축된 데이터 [+ 확장된 로컬 헤더]?]* [중앙 디렉터리]* [중앙 디렉터리 레코드의 끝]

자세한 내용은 다음 링크를 참고하세요. https://ko.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()
boolean isSymLink()

심볼릭 링크인지 확인합니다.

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: 정보 블록의 시작 오프셋입니다.

생성 값
IOException

중앙 디렉터리 정보

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

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

매개변수
data byte: 파일 항목의 정보가 포함된 데이터의 byte[]입니다.

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

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

생성 값
IOException

보호되는 생성자

중앙 디렉터리 정보

protected CentralDirectoryInfo ()

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

공개 메서드

equals

public boolean equals (Object o)

매개변수
o Object

반환 값
boolean

get압축 크기

public int getCompressedSize ()

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

반환 값
int

get압축 메서드

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

getFileName

public String getFileName ()

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

반환 값
String

getFileNameLength

public int getFileNameLength ()

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

반환 값
int

getFilePermission

public int getFilePermission ()

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

반환 값
int

getInfoSize

public int getInfoSize ()

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

반환 값
int

getInternalFileAttributes

public int getInternalFileAttributes ()

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

반환 값
int

getLocalHeaderOffset

public long getLocalHeaderOffset ()

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

반환 값
long

getUn압축Size

public long getUncompressedSize ()

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

반환 값
long

hashCode

public int hashCode ()

반환 값
int

isSymLink

public boolean isSymLink ()

심볼릭 링크인지 확인합니다.

반환 값
boolean

set압축 크기

public void setCompressedSize (long compressionSize)

압축 크기를 설정합니다.

매개변수
compressionSize long

set압축 메서드

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

setFileName 클래스의 정적 변수

public void setFileName (String fileName)

상대 경로를 포함하여 파일 이름을 설정합니다.

매개변수
fileName String

파일 이름 길이 설정

public void setFileNameLength (int fileNameLength)

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

매개변수
fileNameLength int

setInternalFileAttributes

public void setInternalFileAttributes (int internalFileAttributes)

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

매개변수
internalFileAttributes int

setLocalHeaderOffset

public void setLocalHeaderOffset (long localHeaderOffset)

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

매개변수
localHeaderOffset long

setUn압축 크기

public void setUncompressedSize (long uncompressedSize)

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

매개변수
uncompressedSize long

toString

public String toString ()

반환 값
String