Class UnrecognizedExtraField

  • All Implemented Interfaces:

    public class UnrecognizedExtraField
    extends java.lang.Object
    implements ZipExtraField
    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.

    • Constructor Detail

      • UnrecognizedExtraField

        public UnrecognizedExtraField()
    • Method Detail

      • setHeaderId

        public void setHeaderId​(ZipShort headerId)
        Set the header id.
        headerId - the header id to use
      • 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
      • getLocalFileDataData

        public byte[] getLocalFileDataData()
        Get the local data.
        Specified by:
        getLocalFileDataData in interface 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.
        Specified by:
        getCentralDirectoryLength in interface ZipExtraField
        the central data length
      • getCentralDirectoryData

        public byte[] getCentralDirectoryData()
        Get the central data.
        Specified by:
        getCentralDirectoryData in interface ZipExtraField
        the central data if present, else return the local file data