ZipEntry Class

Contains methods to get and set information about a zip file entry.

Compression

The following are methods for ZipEntry.

  • equals(obj)

    Compares this object with the specified object and returns true if both objects are equal; otherwise, returns false.

  • hashcode()

    Returns the hash code value for the zip entry.

  • getComment()

    Gets the comment string for the zip entry.

  • getCompressedSize()

    Gets the size in bytes of the compressed zip entry.

  • getContent()

    Gets the content of the zip entry. This method doesn’t work with the ZipReader class.

  • getCrc()

    Gets the cyclic redundancy check (CRC) value for the zip entry.

  • getLastModifiedTime()

    Gets the last modification timestamp of the zip entry.

  • getMethod()

    Gets the compression method of the zip entry.

  • getName()

    Gets the name of the zip entry.

  • getUncompressedSize()

    Gets the uncompressed size in bytes of the zip entry content.

  • setComment(comment)

    Sets the comment string for the zip entry that’s written to the Zip archive. This method doesn’t work with the ZipReader class.

  • setContent(blob)

    Sets the content of the zip entry that’s written to the Zip archive. This method doesn’t work with the ZipReader class.

  • setLastModifiedTime(modTime)

    Sets the last modification time of the zip entry that’s written to the Zip archive. This method doesn’t work with the ZipReader class.

  • setMethod(method)

    Sets the compression method for the zip entry that’s written to the zip archive. This method doesn’t work with the ZipReader class.

  • toString()

    Returns a string representation of the zip entry.

Compares this object with the specified object and returns true if both objects are equal; otherwise, returns false.

public Boolean equals(Object obj)

  • obj: Type: Object

Type: Boolean

Returns the hash code value for the zip entry.

public Integer hashcode()

Type: Integer

Gets the comment string for the zip entry.

public string getComment()

Type: string

Gets the size in bytes of the compressed zip entry.

public long getCompressedSize()

Type: long

Gets the content of the zip entry. This method doesn’t work with the ZipReader class.

public blob getContent()

Type: blob

Gets the cyclic redundancy check (CRC) value for the zip entry.

public long getCrc()

Type: long

Gets the last modification timestamp of the zip entry.

public Datetime getLastModifiedTime()

Type: Datetime

Gets the compression method of the zip entry.

public Compression.Method getMethod()

Type: Compression.Method

Uses values from the Method enum and indicates whether the zip entry has DEFLATED or STORED method.

Gets the name of the zip entry.

public string getName()

Type: string

Gets the uncompressed size in bytes of the zip entry content.

public long getUncompressedSize()

Type: long

Sets the comment string for the zip entry that’s written to the Zip archive. This method doesn’t work with the ZipReader class.

public Compression.ZipEntry setComment(String comment)

Type: Compression.ZipEntry

Sets the content of the zip entry that’s written to the Zip archive. This method doesn’t work with the ZipReader class.

public Compression.ZipEntry setContent(Blob blob)

Type: Compression.ZipEntry

Sets the last modification time of the zip entry that’s written to the Zip archive. This method doesn’t work with the ZipReader class.

public Compression.ZipEntry setLastModifiedTime(Datetime modTime)

Type: Compression.ZipEntry

Sets the compression method for the zip entry that’s written to the zip archive. This method doesn’t work with the ZipReader class.

public Compression.ZipEntry setMethod(Compression.Method method)

  • method: Type: Compression.Method Uses the Method enum values and sets the compression method as DEFLATED or STORED.

Type: Compression.ZipEntry

Returns a string representation of the zip entry.

public string toString()

Type: string