ZipEntry Class

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

Namespace

Compression

ZipEntry Methods

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.

Signature

public Boolean equals(Object obj)

Parameters

obj
Type: Object

Return Value

Type: Boolean

hashcode()

Returns the hash code value for the zip entry.

Signature

public Integer hashcode()

Return Value

Type: Integer

getComment()

Gets the comment string for the zip entry.

Signature

public string getComment()

Return Value

Type: string

getCompressedSize()

Gets the size in bytes of the compressed zip entry.

Signature

public long getCompressedSize()

Return Value

Type: long

getContent()

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

Signature

public blob getContent()

Return Value

Type: blob

getCrc()

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

Signature

public long getCrc()

Return Value

Type: long

getLastModifiedTime()

Gets the last modification timestamp of the zip entry.

Signature

public Datetime getLastModifiedTime()

Return Value

Type: Datetime

getMethod()

Gets the compression method of the zip entry.

Signature

public Compression.Method getMethod()

Return Value

Type: Compression.Method

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

getName()

Gets the name of the zip entry.

Signature

public string getName()

Return Value

Type: string

getUncompressedSize()

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

Signature

public long getUncompressedSize()

Return Value

Type: long

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.

Signature

public Compression.ZipEntry setComment(String comment)

Parameters

comment
Type: String

Return Value

Type: Compression.ZipEntry

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.

Signature

public Compression.ZipEntry setContent(Blob blob)

Parameters

blob
Type: Blob

Return Value

Type: Compression.ZipEntry

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.

Signature

public Compression.ZipEntry setLastModifiedTime(Datetime modTime)

Parameters

modTime
Type: Datetime

Return Value

Type: Compression.ZipEntry

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.

Signature

public Compression.ZipEntry setMethod(Compression.Method method)

Parameters

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

Return Value

Type: Compression.ZipEntry

toString()

Returns a string representation of the zip entry.

Signature

public string toString()

Return Value

Type: string