Package 

Class AbstractUnicodeExtraField

  • All Implemented Interfaces:
    org.readium.r2.shared.util.zip.compress.archivers.zip.ZipExtraField

    
    public abstract class AbstractUnicodeExtraField
     implements ZipExtraField
                        

    A common base class for Unicode extra information extra fields.

    • Method Summary

      Modifier and Type Method Description
      long getNameCRC32()
      void setNameCRC32(long nameCRC32)
      Array<byte> getUnicodeName()
      void setUnicodeName(Array<byte> unicodeName)
      Array<byte> getCentralDirectoryData() The actual data to put into central directory - without Header-ID orlength specifier.
      ZipShort getCentralDirectoryLength() Length of the extra field in the central directory - withoutHeader-ID or length specifier.
      Array<byte> getLocalFileDataData() The actual data to put into local file data - without Header-IDor length specifier.
      ZipShort getLocalFileDataLength() Length of the extra field in the local file data - withoutHeader-ID or length specifier.
      void parseFromCentralDirectoryData(Array<byte> buffer, int offset, int length) Doesn't do anything special since this class always uses thesame data in central directory and local file data.
      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 org.readium.r2.shared.util.zip.compress.archivers.zip.ZipExtraField

        getHeaderId, parseFromCentralDirectoryData, parseFromLocalFileData
      • Methods inherited from class java.lang.Object

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

      • setNameCRC32

         void setNameCRC32(long nameCRC32)
        Parameters:
        nameCRC32 - The CRC32 checksum of the file name as encodedin the central directory of the zip file to set.
      • setUnicodeName

         void setUnicodeName(Array<byte> unicodeName)
        Parameters:
        unicodeName - The UTF-8 encoded name to set.
      • getCentralDirectoryData

         Array<byte> getCentralDirectoryData()

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

      • getLocalFileDataData

         Array<byte> getLocalFileDataData()

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

      • parseFromCentralDirectoryData

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

        Doesn't do anything special since this class always uses thesame data in central directory and local file data.

      • parseFromLocalFileData

         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