Class AbstractUnicodeExtraField

    • Method Detail

      • getNameCRC32

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

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

        public byte[] getUnicodeName()
        Returns:
        The UTF-8 encoded name.
      • setUnicodeName

        public void setUnicodeName​(byte[] unicodeName)
        Parameters:
        unicodeName - The UTF-8 encoded name to set.
      • getCentralDirectoryData

        public byte[] getCentralDirectoryData()
        Description copied from interface: ZipExtraField
        The actual data to put into central directory - without Header-ID or length specifier.
        Specified by:
        getCentralDirectoryData in interface ZipExtraField
        Returns:
        the data
      • getCentralDirectoryLength

        public ZipShort getCentralDirectoryLength()
        Description copied from interface: ZipExtraField
        Length of the extra field in the central directory - without Header-ID or length specifier.
        Specified by:
        getCentralDirectoryLength in interface ZipExtraField
        Returns:
        the length of the field in the central directory
      • getLocalFileDataData

        public byte[] getLocalFileDataData()
        Description copied from interface: ZipExtraField
        The actual data to put into local file data - without Header-ID or length specifier.
        Specified by:
        getLocalFileDataData in interface ZipExtraField
        Returns:
        the data
      • getLocalFileDataLength

        public ZipShort getLocalFileDataLength()
        Description copied from interface: ZipExtraField
        Length of the extra field in the local file data - without Header-ID or length specifier.
        Specified by:
        getLocalFileDataLength in interface ZipExtraField
        Returns:
        the length of the field in the local file data
      • parseFromLocalFileData

        public void parseFromLocalFileData​(byte[] buffer,
                                           int offset,
                                           int length)
                                    throws java.util.zip.ZipException
        Description copied from interface: ZipExtraField
        Populate data from this array as if it was in local file data.
        Specified by:
        parseFromLocalFileData in interface ZipExtraField
        Parameters:
        buffer - the buffer to read data from
        offset - offset into buffer to read data
        length - the length of data
        Throws:
        java.util.zip.ZipException - on error
      • parseFromCentralDirectoryData

        public void parseFromCentralDirectoryData​(byte[] buffer,
                                                  int offset,
                                                  int length)
                                           throws java.util.zip.ZipException
        Doesn't do anything special since this class always uses the same data in central directory and local file data.
        Specified by:
        parseFromCentralDirectoryData in interface ZipExtraField
        Parameters:
        buffer - the buffer to read data from
        offset - offset into buffer to read data
        length - the length of data
        Throws:
        java.util.zip.ZipException - on error