net.lingala.zip4j.model
Class FileHeader

java.lang.Object
  extended by net.lingala.zip4j.model.FileHeader

public class FileHeader
extends Object


Constructor Summary
FileHeader()
           
 
Method Summary
 void extractFile(ZipModel zipModel, String outPath, ProgressMonitor progressMonitor, boolean runInThread)
          Extracts file to the specified directory
 void extractFile(ZipModel zipModel, String outPath, UnzipParameters unzipParameters, ProgressMonitor progressMonitor, boolean runInThread)
          Extracts file to the specified directory using any user defined parameters in UnzipParameters
 void extractFile(ZipModel zipModel, String outPath, UnzipParameters unzipParameters, String newFileName, ProgressMonitor progressMonitor, boolean runInThread)
          Extracts file to the specified directory using any user defined parameters in UnzipParameters.
 AESExtraDataRecord getAesExtraDataRecord()
           
 long getCompressedSize()
           
 int getCompressionMethod()
           
 long getCrc32()
           
 byte[] getCrcBuff()
           
 int getDiskNumberStart()
           
 int getEncryptionMethod()
           
 byte[] getExternalFileAttr()
           
 ArrayList getExtraDataRecords()
           
 int getExtraFieldLength()
           
 String getFileComment()
           
 int getFileCommentLength()
           
 String getFileName()
           
 int getFileNameLength()
           
 byte[] getGeneralPurposeFlag()
           
 byte[] getInternalFileAttr()
           
 int getLastModFileTime()
           
 long getOffsetLocalHeader()
           
 String getPassword()
           
 int getSignature()
           
 long getUncompressedSize()
           
 int getVersionMadeBy()
           
 int getVersionNeededToExtract()
           
 Zip64ExtendedInfo getZip64ExtendedInfo()
           
 boolean isDataDescriptorExists()
           
 boolean isDirectory()
           
 boolean isEncrypted()
           
 boolean isFileNameUTF8Encoded()
           
 void setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord)
           
 void setCompressedSize(long compressedSize)
           
 void setCompressionMethod(int compressionMethod)
           
 void setCrc32(long crc32)
           
 void setCrcBuff(byte[] crcBuff)
           
 void setDataDescriptorExists(boolean dataDescriptorExists)
           
 void setDirectory(boolean isDirectory)
           
 void setDiskNumberStart(int diskNumberStart)
           
 void setEncrypted(boolean isEncrypted)
           
 void setEncryptionMethod(int encryptionMethod)
           
 void setExternalFileAttr(byte[] externalFileAttr)
           
 void setExtraDataRecords(ArrayList extraDataRecords)
           
 void setExtraFieldLength(int extraFieldLength)
           
 void setFileComment(String fileComment)
           
 void setFileCommentLength(int fileCommentLength)
           
 void setFileName(String fileName)
           
 void setFileNameLength(int fileNameLength)
           
 void setFileNameUTF8Encoded(boolean fileNameUTF8Encoded)
           
 void setGeneralPurposeFlag(byte[] generalPurposeFlag)
           
 void setInternalFileAttr(byte[] internalFileAttr)
           
 void setLastModFileTime(int lastModFileTime)
           
 void setOffsetLocalHeader(long offsetLocalHeader)
           
 void setPassword(String password)
           
 void setSignature(int signature)
           
 void setUncompressedSize(long uncompressedSize)
           
 void setVersionMadeBy(int versionMadeBy)
           
 void setVersionNeededToExtract(int versionNeededToExtract)
           
 void setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHeader

public FileHeader()
Method Detail

getSignature

public int getSignature()

setSignature

public void setSignature(int signature)

getVersionMadeBy

public int getVersionMadeBy()

setVersionMadeBy

public void setVersionMadeBy(int versionMadeBy)

getVersionNeededToExtract

public int getVersionNeededToExtract()

setVersionNeededToExtract

public void setVersionNeededToExtract(int versionNeededToExtract)

getGeneralPurposeFlag

public byte[] getGeneralPurposeFlag()

setGeneralPurposeFlag

public void setGeneralPurposeFlag(byte[] generalPurposeFlag)

getCompressionMethod

public int getCompressionMethod()

setCompressionMethod

public void setCompressionMethod(int compressionMethod)

getLastModFileTime

public int getLastModFileTime()

setLastModFileTime

public void setLastModFileTime(int lastModFileTime)

getCrc32

public long getCrc32()

setCrc32

public void setCrc32(long crc32)

getCompressedSize

public long getCompressedSize()

setCompressedSize

public void setCompressedSize(long compressedSize)

getUncompressedSize

public long getUncompressedSize()

setUncompressedSize

public void setUncompressedSize(long uncompressedSize)

getFileNameLength

public int getFileNameLength()

setFileNameLength

public void setFileNameLength(int fileNameLength)

getExtraFieldLength

public int getExtraFieldLength()

setExtraFieldLength

public void setExtraFieldLength(int extraFieldLength)

getFileCommentLength

public int getFileCommentLength()

setFileCommentLength

public void setFileCommentLength(int fileCommentLength)

getDiskNumberStart

public int getDiskNumberStart()

setDiskNumberStart

public void setDiskNumberStart(int diskNumberStart)

getInternalFileAttr

public byte[] getInternalFileAttr()

setInternalFileAttr

public void setInternalFileAttr(byte[] internalFileAttr)

getExternalFileAttr

public byte[] getExternalFileAttr()

setExternalFileAttr

public void setExternalFileAttr(byte[] externalFileAttr)

getOffsetLocalHeader

public long getOffsetLocalHeader()

setOffsetLocalHeader

public void setOffsetLocalHeader(long offsetLocalHeader)

getFileName

public String getFileName()

setFileName

public void setFileName(String fileName)

getFileComment

public String getFileComment()

setFileComment

public void setFileComment(String fileComment)

isDirectory

public boolean isDirectory()

setDirectory

public void setDirectory(boolean isDirectory)

extractFile

public void extractFile(ZipModel zipModel,
                        String outPath,
                        ProgressMonitor progressMonitor,
                        boolean runInThread)
                 throws ZipException
Extracts file to the specified directory

Parameters:
zipModel -
outPath -
Throws:
ZipException

extractFile

public void extractFile(ZipModel zipModel,
                        String outPath,
                        UnzipParameters unzipParameters,
                        ProgressMonitor progressMonitor,
                        boolean runInThread)
                 throws ZipException
Extracts file to the specified directory using any user defined parameters in UnzipParameters

Parameters:
zipModel -
outPath -
unzipParameters -
Throws:
ZipException

extractFile

public void extractFile(ZipModel zipModel,
                        String outPath,
                        UnzipParameters unzipParameters,
                        String newFileName,
                        ProgressMonitor progressMonitor,
                        boolean runInThread)
                 throws ZipException
Extracts file to the specified directory using any user defined parameters in UnzipParameters. Ouput file name will be overwritten with the value in newFileName. If this parameter is null, then file name will be the same as in FileHeader.getFileName

Parameters:
zipModel -
outPath -
unzipParameters -
Throws:
ZipException

isEncrypted

public boolean isEncrypted()

setEncrypted

public void setEncrypted(boolean isEncrypted)

getEncryptionMethod

public int getEncryptionMethod()

setEncryptionMethod

public void setEncryptionMethod(int encryptionMethod)

getCrcBuff

public byte[] getCrcBuff()

setCrcBuff

public void setCrcBuff(byte[] crcBuff)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getExtraDataRecords

public ArrayList getExtraDataRecords()

setExtraDataRecords

public void setExtraDataRecords(ArrayList extraDataRecords)

isDataDescriptorExists

public boolean isDataDescriptorExists()

setDataDescriptorExists

public void setDataDescriptorExists(boolean dataDescriptorExists)

getZip64ExtendedInfo

public Zip64ExtendedInfo getZip64ExtendedInfo()

setZip64ExtendedInfo

public void setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo)

getAesExtraDataRecord

public AESExtraDataRecord getAesExtraDataRecord()

setAesExtraDataRecord

public void setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord)

isFileNameUTF8Encoded

public boolean isFileNameUTF8Encoded()

setFileNameUTF8Encoded

public void setFileNameUTF8Encoded(boolean fileNameUTF8Encoded)


Copyright © 2011. All Rights Reserved.