类 UnrecognizedExtraField

java.lang.Object
com.sh.common.zip.UnrecognizedExtraField
所有已实现的接口:
CentralDirectoryParsingZipExtraField, ZipExtraField

public class UnrecognizedExtraField extends Object implements CentralDirectoryParsingZipExtraField
Simple placeholder for all those extra fields we don't want to deal with.

Assumes local file data and central directory entries are identical - unless told the opposite.

  • 构造器详细资料

    • UnrecognizedExtraField

      public UnrecognizedExtraField()
  • 方法详细资料

    • setHeaderId

      public void setHeaderId(ZipShort headerId)
      Set the header id.
      参数:
      headerId - the header id to use
    • getHeaderId

      public ZipShort getHeaderId()
      Get the header id.
      指定者:
      getHeaderId 在接口中 ZipExtraField
      返回:
      the header id
    • setLocalFileDataData

      public void setLocalFileDataData(byte[] data)
      Set the extra field data in the local file data - without Header-ID or length specifier.
      参数:
      data - the field data to use
    • getLocalFileDataLength

      public ZipShort getLocalFileDataLength()
      Get the length of the local data.
      指定者:
      getLocalFileDataLength 在接口中 ZipExtraField
      返回:
      the length of the local data
    • getLocalFileDataData

      public byte[] getLocalFileDataData()
      Get the local data.
      指定者:
      getLocalFileDataData 在接口中 ZipExtraField
      返回:
      the local data
    • setCentralDirectoryData

      public void setCentralDirectoryData(byte[] data)
      Set the extra field data in central directory.
      参数:
      data - the data to use
    • getCentralDirectoryLength

      public ZipShort getCentralDirectoryLength()
      Get the central data length. If there is no central data, get the local file data length.
      指定者:
      getCentralDirectoryLength 在接口中 ZipExtraField
      返回:
      the central data length
    • getCentralDirectoryData

      public byte[] getCentralDirectoryData()
      Get the central data.
      指定者:
      getCentralDirectoryData 在接口中 ZipExtraField
      返回:
      the central data if present, else return the local file data
    • parseFromLocalFileData

      public void parseFromLocalFileData(byte[] data, int offset, int length)
      从接口复制的说明: ZipExtraField
      Populate data from this array as if it was in local file data.
      指定者:
      parseFromLocalFileData 在接口中 ZipExtraField
      参数:
      data - the array of bytes.
      offset - the source location in the data array.
      length - the number of bytes to use in the data array.
      另请参阅:
    • parseFromCentralDirectoryData

      public void parseFromCentralDirectoryData(byte[] data, int offset, int length)
      从接口复制的说明: CentralDirectoryParsingZipExtraField
      Populate data from this array as if it was in central directory data.
      指定者:
      parseFromCentralDirectoryData 在接口中 CentralDirectoryParsingZipExtraField
      参数:
      data - the array of bytes.
      offset - the source location in the data array.
      length - the number of bytes to use in the data array.