Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
         
       
     
  
  
  
  
  
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
  
  
  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
| 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.
        
    
 | 
  
Constants
    
    
      
  
      
  
    
public static final int LOCAL_FILE_HEADER_SIZE
    
    
    
  
    
      Constant Value:
      
          30
          (0x0000001e)
      
    
 
Public constructors
    
    
public LocalFileHeader (File partialZipFile)
    
    
    
  
    
    | Parameters | 
|---|
      
        | partialZipFile | File | 
    
 
    
    
public LocalFileHeader (File partialZipFile, 
                long startOffset)
    
    
    
  Constructor to collect local file header information of a file entry in a zip file.
    
    | Parameters | 
|---|
      
        | partialZipFile | File: aERROR(/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 ()
    
    
    
  
    
 
    getCompressionMethod
    
public int getCompressionMethod ()
    
    
    
  
    
 
    getCrc
    
public long getCrc ()
    
    
    
  
    
 
    
    
public int getExtraFieldLength ()
    
    
    
  
    
 
    getFileNameLength
    
public int getFileNameLength ()
    
    
    
  
    
 
    
    
public int getHeaderSize ()
    
    
    
  
    
 
    getUncompressedSize
    
public long getUncompressedSize ()
    
    
    
  
    
 
 
 
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2023-03-08 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[]]