ZipEntry Class
Contains methods to get and set information about a zip file entry.
The following are methods for ZipEntry.
-
Compares this object with the specified object and returns
trueif both objects are equal; otherwise, returnsfalse. -
Returns the hash code value for the zip entry.
-
Gets the comment string for the zip entry.
-
Gets the size in bytes of the compressed zip entry.
-
Gets the content of the zip entry. This method doesn’t work with the
ZipReaderclass. -
Gets the cyclic redundancy check (CRC) value for the zip entry.
-
Gets the last modification timestamp of the zip entry.
-
Gets the compression method of the zip entry.
-
Gets the name of the zip entry.
-
Gets the uncompressed size in bytes of the zip entry content.
-
Sets the comment string for the zip entry that’s written to the Zip archive. This method doesn’t work with the
ZipReaderclass. -
Sets the content of the zip entry that’s written to the Zip archive. This method doesn’t work with the
ZipReaderclass. -
Sets the last modification time of the zip entry that’s written to the Zip archive. This method doesn’t work with the
ZipReaderclass. -
Sets the compression method for the zip entry that’s written to the zip archive. This method doesn’t work with the
ZipReaderclass. -
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)
- comment: Type: String
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)
- blob: Type: 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)
- modTime: Type: Datetime
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
Methodenum values and sets the compression method asDEFLATEDorSTORED.
Type: Compression.ZipEntry
Returns a string representation of the zip entry.
public string toString()
Type: string