Stay organized with collections Save and categorize content based on your preferences.

LocalFileHeader

public final class LocalFileHeader
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.zip.LocalFileHeader


LocalFileHeader is a class containing the information of a file/folder inside a zip file. The block of data is at the beginning part of each file entry.

Overall zipfile format: [Local file header + Compressed data [+ Extended local header]?]* [Central directory]* [End of central directory record]

Refer to following link for more details: https://en.wikipedia.org/wiki/Zip_(file_format)

Summary

Constants

int LOCAL_FILE_HEADER_SIZE

Public constructors

LocalFileHeader(File partialZipFile)
LocalFileHeader(File partialZipFile, long startOffset)

Constructor to collect local file header information of a file entry in a zip file.

Public methods

long getCompressedSize()
int getCompressionMethod()
long getCrc()
int getExtraFieldLength()
int getFileNameLength()
int getHeaderSize()
long getUncompressedSize()

Constants

LOCAL_FILE_HEADER_SIZE

public static final int LOCAL_FILE_HEADER_SIZE

Constant Value: 30 (0x0000001e)

Public constructors

LocalFileHeader

public LocalFileHeader (File partialZipFile)

Parameters
partialZipFile File

LocalFileHeader

public LocalFileHeader (File partialZipFile, 
                long startOffset)

Constructor to collect local file header information of a file entry in a zip file.

Parameters
partialZipFile File: a ERROR(/File) contains the local file header information.

startOffset long: the start offset of the block of data for a local file header.

Public methods

getCompressedSize

public long getCompressedSize ()

Returns
long

getCompressionMethod

public int getCompressionMethod ()

Returns
int

getCrc

public long getCrc ()

Returns
long

getExtraFieldLength

public int getExtraFieldLength ()

Returns
int

getFileNameLength

public int getFileNameLength ()

Returns
int

getHeaderSize

public int getHeaderSize ()

Returns
int

getUncompressedSize

public long getUncompressedSize ()

Returns
long