类 AbstractUnicodeExtraField

java.lang.Object
com.sh.common.zip.AbstractUnicodeExtraField
所有已实现的接口:
ZipExtraField
直接已知子类:
UnicodeCommentExtraField, UnicodePathExtraField

public abstract class AbstractUnicodeExtraField extends Object implements ZipExtraField
A common base class for Unicode extra information extra fields.
  • 构造器详细资料

    • AbstractUnicodeExtraField

      protected AbstractUnicodeExtraField()
    • AbstractUnicodeExtraField

      protected AbstractUnicodeExtraField(String text, byte[] bytes, int off, int len)
      Assemble as unicode extension from the name/comment and encoding of the orginal zip entry.
      参数:
      text - The file name or comment.
      bytes - The encoded of the filename or comment in the zip file.
      off - The offset of the encoded filename or comment in bytes.
      len - The length of the encoded filename or commentin bytes.
    • AbstractUnicodeExtraField

      protected AbstractUnicodeExtraField(String text, byte[] bytes)
      Assemble as unicode extension from the name/comment and encoding of the orginal zip entry.
      参数:
      text - The file name or comment.
      bytes - The encoded of the filename or comment in the zip file.
  • 方法详细资料

    • getNameCRC32

      public long getNameCRC32()
      返回:
      The CRC32 checksum of the filename or comment as encoded in the central directory of the zip file.
    • setNameCRC32

      public void setNameCRC32(long nameCRC32)
      参数:
      nameCRC32 - The CRC32 checksum of the filename as encoded in the central directory of the zip file to set.
    • getUnicodeName

      public byte[] getUnicodeName()
      返回:
      The utf-8 encoded name.
    • setUnicodeName

      public void setUnicodeName(byte[] unicodeName)
      参数:
      unicodeName - The utf-8 encoded name to set.
    • getCentralDirectoryData

      public byte[] getCentralDirectoryData()
      从接口复制的说明: ZipExtraField
      The actual data to put into central directory - without Header-ID or length specifier.
      指定者:
      getCentralDirectoryData 在接口中 ZipExtraField
      返回:
      the data
    • getCentralDirectoryLength

      public ZipShort getCentralDirectoryLength()
      从接口复制的说明: ZipExtraField
      Length of the extra field in the central directory - without Header-ID or length specifier.
      指定者:
      getCentralDirectoryLength 在接口中 ZipExtraField
      返回:
      the length of the field in the central directory
    • getLocalFileDataData

      public byte[] getLocalFileDataData()
      从接口复制的说明: ZipExtraField
      The actual data to put into local file data - without Header-ID or length specifier.
      指定者:
      getLocalFileDataData 在接口中 ZipExtraField
      返回:
      the data
    • getLocalFileDataLength

      public ZipShort getLocalFileDataLength()
      从接口复制的说明: ZipExtraField
      Length of the extra field in the local file data - without Header-ID or length specifier.
      指定者:
      getLocalFileDataLength 在接口中 ZipExtraField
      返回:
      the length of the field in the local file data
    • parseFromLocalFileData

      public void parseFromLocalFileData(byte[] buffer, int offset, int length) throws ZipException
      从接口复制的说明: ZipExtraField
      Populate data from this array as if it was in local file data.
      指定者:
      parseFromLocalFileData 在接口中 ZipExtraField
      参数:
      buffer - an array of bytes
      offset - the start offset
      length - the number of bytes in the array from offset
      抛出:
      ZipException - on error