Google cam kết thúc đẩy công bằng chủng tộc cho Cộng đồng người da đen. Xem cách thực hiện.

CentralDirectoryInfo

public final class CentralDirectoryInfo
extends Object

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


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

Định dạng tệp zip tổng thể: [Tiêu đề tệp cục bộ + Dữ liệu được nén [+ Tiêu đề cục bộ mở rộng]?] * [Thư mục trung tâm] * [Bản ghi cuối 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

Các nhà xây dựng công cộng

CentralDirectoryInfo (byte[] data, int startOffset)

Hàm tạo để thu thập thông tin của một mục nhập tệp bên trong tệp zip.

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

Hàm tạo để thu thập thông tin của một mục nhập tệp bên trong tệp zip.

Các trì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 pháp công khai

boolean equals (Object o)
int getCompressedSize ()

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

int getCompressionMethod ()

Lấy phương pháp nén.

long getCrc ()

Nhận CRC của tệp.

long getExternalFileAttributes ()

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

int getExtraFieldLength ()

Nhận thêm chiều dài trường.

int getFileCommentLength ()

Nhận độ dài nhận xét 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 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 ()

Nhận 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 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 ()

Nhận 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 cả đườ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 ()

Các nhà xây dựng công cộng

CentralDirectoryInfo

public CentralDirectoryInfo (byte[] data, 
                int startOffset)

Hàm tạo để thu thập thông tin của một 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 : phần bù bắt đầu của khối thông tin.

CentralDirectoryInfo

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

Hàm tạo để thu thập thông tin của một 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 : phần bù bắt đầu 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.

Các trì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 pháp công khai

bằng

public boolean equals (Object o)

Thông số
o Object

Lợi nhuận
boolean

getCompressedSize

public int getCompressedSize ()

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

Lợi nhuận
int

getCompressionMethod

public int getCompressionMethod ()

Lấy phương pháp nén.

Lợi nhuận
int

getCrc

public long getCrc ()

Nhận CRC của tệp.

Lợi nhuận
long

getExternalFileAttributes

public long getExternalFileAttributes ()

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

Lợi nhuận
long

getExtraFieldLength

public int getExtraFieldLength ()

Nhận thêm chiều dài trường.

Lợi nhuận
int

getFileCommentLength

public int getFileCommentLength ()

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

Lợi nhuận
int

getFileName

public String getFileName ()

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

Lợi nhuận
String

getFileNameLength

public int getFileNameLength ()

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

Lợi nhuận
int

getFilePermission

public int getFilePermission ()

Nhận quyền 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.

Lợi nhuận
int

getInfoSize

public int getInfoSize ()

Nhận kích thước của mục nhập thư mục trung tâm.

Lợi nhuận
int

getInternalFileAttributes

public int getInternalFileAttributes ()

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

Lợi nhuận
int

getLocalHeaderOffset

public long getLocalHeaderOffset ()

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

Lợi nhuận
long

getUncompressedSize

public long getUncompressedSize ()

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

Lợi nhuận
long

Mã Băm

public int hashCode ()

Lợi nhuận
int

setCompressedSize

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

setExtraFieldLength

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 cả đườ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

setUncompressedSize

public void setUncompressedSize (long uncompressedSize)

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

Thông số
uncompressedSize long

toString

public String toString ()

Lợi nhuận
String