CentralDirectoryInfo

public final class CentralDirectoryInfo
extends Object

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


CentralDirectoryInfo là lớp chứa thông tin của tệp/thư mục bên trong tệp zip.

Định dạng zipfile tổng thể: [Tiêu đề tệp cục bộ + Dữ liệu nén [+ Tiêu đề cục bộ mở rộng]?]* [Thư mục trung tâm]* [Kết thúc bản ghi thư mục trung tâm]

Tham khảo liên kết sau để biết thêm chi tiết: https://en.wikipedia.org/wiki/Zip_(file_format)

Bản tóm tắt

nhà thầu công cộng

CentralDirectoryInfo (byte[] data, int startOffset)

Trình xây dựng để thu thập thông tin của mục nhập tệp bên trong tệp zip.

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

Trình xây dựng để thu thập thông tin của mục nhập tệp bên trong tệp zip.

Các nhà xây dựng được bảo vệ

CentralDirectoryInfo ()

Hàm tạo mặc định được sử dụng để kiểm tra đơn vị.

Phương thức công khai

boolean equals (Object o)
int getCompressedSize ()

Nhận kích thước nén.

int getCompressionMethod ()

Nhận phương pháp nén.

long getCrc ()

Lấy CRC của tệp.

long getExternalFileAttributes ()

Nhận các thuộc tính tệp bên ngoài.

int getExtraFieldLength ()

Lấy độ dài trường bổ sung.

int getFileCommentLength ()

Nhận độ dài nhận xét của tệp.

String getFileName ()

Lấy tên tệp bao gồm cả đường dẫn tương đối.

int getFileNameLength ()

Lấy độ dài tên tệp.

int getFilePermission ()

Nhận quyền truy cập tệp Linux, được lưu trữ trong 9 bit cuối cùng của thuộc tính tệp bên ngoài.

int getInfoSize ()

Lấy kích thước của mục nhập thư mục trung tâm.

int getInternalFileAttributes ()

Nhận các thuộc tính tập tin nội bộ.

long getLocalHeaderOffset ()

Nhận phần bù của mục nhập tiêu đề tệp cục bộ.

long getUncompressedSize ()

Lấy kích thước không nén.

int hashCode ()
void setCompressedSize (long compressionSize)

Đặt kích thước nén.

void setCompressionMethod (int compressionMethod)

Đặt phương pháp nén.

void setCrc (long crc)

Đặt CRC của tệp.

void setExternalFileAttributes (long externalFileAttributes)

Đặt thuộc tính tệp bên ngoài.

void setExtraFieldLength (int extraFieldLength)

Đặt độ dài trường bổ sung.

void setFileCommentLength (int fileCommentLength)

Đặt độ dài nhận xét tệp.

void setFileName (String fileName)

Đặt tên tệp bao gồm đường dẫn tương đối.

void setFileNameLength (int fileNameLength)

Đặt độ dài tên tệp.

void setInternalFileAttributes (int internalFileAttributes)

Đặt thuộc tính tệp nội bộ.

void setLocalHeaderOffset (long localHeaderOffset)

Đặt độ lệch của mục nhập tiêu đề tệp cục bộ.

void setUncompressedSize (long uncompressedSize)

Đặt kích thước không nén.

String toString ()

nhà thầu công cộng

CentralDirectoryInfo

public CentralDirectoryInfo (byte[] data, 
                int startOffset)

Trình xây dựng để thu thập thông tin của mục nhập tệp bên trong tệp zip.

Thông số
data byte : byte[] dữ liệu chứa thông tin của một mục nhập tệp.

startOffset int : bắt đầu offset của khối thông tin.

ném
IOException

CentralDirectoryInfo

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

Trình xây dựng để thu thập thông tin của mục nhập tệp bên trong tệp zip.

Thông số
data byte : byte[] dữ liệu chứa thông tin của một mục nhập tệp.

startOffset int : bắt đầu offset của khối thông tin.

useZip64 boolean : một boolean để hỗ trợ định dạng zip64 khi tải xuống một phần.

ném
IOException

Các nhà xây dựng được bảo vệ

CentralDirectoryInfo

protected CentralDirectoryInfo ()

Hàm tạo mặc định được sử dụng để kiểm tra đơn vị.

Phương thức công khai

bằng

public boolean equals (Object o)

Thông số
o Object

trả lại
boolean

getCompressionSize

public int getCompressedSize ()

Nhận kích thước nén.

trả lại
int

getCompressionMethod

public int getCompressionMethod ()

Nhận phương pháp nén.

trả lại
int

getCrc

public long getCrc ()

Lấy CRC của tệp.

trả lại
long

getExternalFileAttributes

public long getExternalFileAttributes ()

Nhận các thuộc tính tệp bên ngoài.

trả lại
long

getExtraFieldChiều dài

public int getExtraFieldLength ()

Lấy độ dài trường bổ sung.

trả lại
int

getFileCommentLength

public int getFileCommentLength ()

Nhận độ dài nhận xét của tệp.

trả lại
int

getFileName

public String getFileName ()

Lấy tên tệp bao gồm cả đường dẫn tương đối.

trả lại
String

getFileNameLength

public int getFileNameLength ()

Lấy độ dài tên tệp.

trả lại
int

getFilePermission

public int getFilePermission ()

Nhận quyền truy cập tệp Linux, được lưu trữ trong 9 bit cuối cùng của thuộc tính tệp bên ngoài.

trả lại
int

getInfoSize

public int getInfoSize ()

Lấy kích thước của mục nhập thư mục trung tâm.

trả lại
int

getInternalFileAttributes

public int getInternalFileAttributes ()

Nhận các thuộc tính tập tin nội bộ.

trả lại
int

getLocalHeaderOffset

public long getLocalHeaderOffset ()

Nhận phần bù của mục nhập tiêu đề tệp cục bộ.

trả lại
long

lấyKích thước không nén

public long getUncompressedSize ()

Lấy kích thước không nén.

trả lại
long

Mã Băm

public int hashCode ()

trả lại
int

setKích thước nén

public void setCompressedSize (long compressionSize)

Đặt kích thước nén.

Thông số
compressionSize long

setCompressionMethod

public void setCompressionMethod (int compressionMethod)

Đặt phương pháp nén.

Thông số
compressionMethod int

setCrc

public void setCrc (long crc)

Đặt CRC của tệp.

Thông số
crc long

setExternalFileAttributes

public void setExternalFileAttributes (long externalFileAttributes)

Đặt thuộc tính tệp bên ngoài.

Thông số
externalFileAttributes long

setExtraFieldChiều dài

public void setExtraFieldLength (int extraFieldLength)

Đặt độ dài trường bổ sung.

Thông số
extraFieldLength int

setFileCommentLength

public void setFileCommentLength (int fileCommentLength)

Đặt độ dài nhận xét tệp.

Thông số
fileCommentLength int

setFileName

public void setFileName (String fileName)

Đặt tên tệp bao gồm đường dẫn tương đối.

Thông số
fileName String

setFileNameLength

public void setFileNameLength (int fileNameLength)

Đặt độ dài tên tệp.

Thông số
fileNameLength int

setInternalFileAttributes

public void setInternalFileAttributes (int internalFileAttributes)

Đặt thuộc tính tệp nội bộ.

Thông số
internalFileAttributes int

setLocalHeaderOffset

public void setLocalHeaderOffset (long localHeaderOffset)

Đặt độ lệch của mục nhập tiêu đề tệp cục bộ.

Thông số
localHeaderOffset long

setKích thước không nén

public void setUncompressedSize (long uncompressedSize)

Đặt kích thước không nén.

Thông số
uncompressedSize long

toString

public String toString ()

trả lại
String