Package 

Interface ZipExtraField


  • 
    public interface ZipExtraField
    
                        

    General format of extra field data.

    Extra fields usually appear twice per file, once in the local file data and once in the central directory. Usually they are the same, but they don't have to be. java.util.zip.ZipOutputStream will only use the local file data in both places.

    • Method Summary

      Modifier and Type Method Description
      abstract Array<byte> getCentralDirectoryData() The actual data to put into central directory - without Header-ID orlength specifier.
      abstract ZipShort getCentralDirectoryLength() Length of the extra field in the central directory - withoutHeader-ID or length specifier.
      abstract ZipShort getHeaderId() The Header-ID.
      abstract Array<byte> getLocalFileDataData() The actual data to put into local file data - without Header-IDor length specifier.
      abstract ZipShort getLocalFileDataLength() Length of the extra field in the local file data - withoutHeader-ID or length specifier.
      abstract void parseFromCentralDirectoryData(Array<byte> buffer, int offset, int length) Populate data from this array as if it was in central directory data.
      abstract void parseFromLocalFileData(Array<byte> buffer, int offset, int length) Populate data from this array as if it was in local file data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getCentralDirectoryData

         abstract Array<byte> getCentralDirectoryData()

        The actual data to put into central directory - without Header-ID orlength specifier.

      • getLocalFileDataData

         abstract Array<byte> getLocalFileDataData()

        The actual data to put into local file data - without Header-IDor length specifier.

      • getLocalFileDataLength

         abstract ZipShort getLocalFileDataLength()

        Length of the extra field in the local file data - withoutHeader-ID or length specifier.

      • parseFromCentralDirectoryData

         abstract void parseFromCentralDirectoryData(Array<byte> buffer, int offset, int length)

        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
      • parseFromLocalFileData

         abstract void parseFromLocalFileData(Array<byte> buffer, int offset, int length)

        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