Interface ZipExtraField

    • Field Detail

      • EXTRAFIELD_HEADER_SIZE

        static final int EXTRAFIELD_HEADER_SIZE
        Size of an extra field field header (id + length).
        Since:
        1.14
        See Also:
        Constant Field Values
    • Method Detail

      • getHeaderId

        ZipShort getHeaderId()
        The Header-ID.
        Returns:
        The HeaderId value
      • getLocalFileDataLength

        ZipShort getLocalFileDataLength()
        Length of the extra field in the local file data - without Header-ID or length specifier.
        Returns:
        the length of the field in the local file data
      • getCentralDirectoryLength

        ZipShort getCentralDirectoryLength()
        Length of the extra field in the central directory - without Header-ID or length specifier.
        Returns:
        the length of the field in the central directory
      • getLocalFileDataData

        byte[] getLocalFileDataData()
        The actual data to put into local file data - without Header-ID or length specifier.
        Returns:
        the data
      • getCentralDirectoryData

        byte[] getCentralDirectoryData()
        The actual data to put into central directory - without Header-ID or length specifier.
        Returns:
        the data
      • parseFromLocalFileData

        void parseFromLocalFileData​(byte[] buffer,
                                    int offset,
                                    int length)
                             throws java.util.zip.ZipException
        Populate data from this array as if it was in local file data.
        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

        void parseFromCentralDirectoryData​(byte[] buffer,
                                           int offset,
                                           int length)
                                    throws java.util.zip.ZipException
        Populate data from this array as if it was in central directory data.
        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