IT. Expert System.

Android Reference

ZipEntry


java.util.zip

Class ZipEntry

  • All Implemented Interfaces:
    Cloneable
    Direct Known Subclasses:
    JarEntry


    public class ZipEntry
    extends Object
    implements Cloneable
    An instance of ZipEntry represents an entry within a ZIP-archive. An entry has attributes such as name (= path) or the size of its data. While an entry identifies data stored in an archive, it does not hold the data itself. For example when reading a ZIP-file you will first retrieve all its entries in a collection and then read the data for a specific entry through an input stream.
    See Also:
    ZipFile, ZipOutputStream
    • Constructor Detail

      • ZipEntry

        public ZipEntry(String name)
        Constructs a new ZipEntry with the specified name.
        Parameters:
        name - the name of the ZIP entry.
        Throws:
        IllegalArgumentException - if the name length is outside the range (> 0xFFFF).
      • ZipEntry

        public ZipEntry(ZipEntry ze)
        Constructs a new ZipEntry using the values obtained from ze.
        Parameters:
        ze - the ZipEntry from which to obtain values.
    • Method Detail

      • getComment

        public String getComment()
        Gets the comment for this ZipEntry.
        Returns:
        the comment for this ZipEntry, or null if there is no comment. If we're reading an archive with ZipInputStream the comment is not available.
      • getCompressedSize

        public long getCompressedSize()
        Gets the compressed size of this ZipEntry.
        Returns:
        the compressed size, or -1 if the compressed size has not been set.
      • getCrc

        public long getCrc()
        Gets the checksum for this ZipEntry.
        Returns:
        the checksum, or -1 if the checksum has not been set.
      • getExtra

        public byte[] getExtra()
        Gets the extra information for this ZipEntry.
        Returns:
        a byte array containing the extra information, or null if there is none.
      • getMethod

        public int getMethod()
        Gets the compression method for this ZipEntry.
        Returns:
        the compression method, either DEFLATED, STORED or -1 if the compression method has not been set.
      • getName

        public String getName()
        Gets the name of this ZipEntry.
        Returns:
        the entry name.
      • getSize

        public long getSize()
        Gets the uncompressed size of this ZipEntry.
        Returns:
        the uncompressed size, or -1 if the size has not been set.
      • getTime

        public long getTime()
        Gets the last modification time of this ZipEntry.
        Returns:
        the last modification time as the number of milliseconds since Jan. 1, 1970.
      • isDirectory

        public boolean isDirectory()
        Determine whether or not this ZipEntry is a directory.
        Returns:
        true when this ZipEntry is a directory, false otherwise.
      • setComment

        public void setComment(String comment)
        Sets the comment for this ZipEntry.
        Parameters:
        comment - the comment for this entry.
      • setCompressedSize

        public void setCompressedSize(long value)
        Sets the compressed size for this ZipEntry.
        Parameters:
        value - the compressed size (in bytes).
      • setCrc

        public void setCrc(long value)
        Sets the checksum for this ZipEntry.
        Parameters:
        value - the checksum for this entry.
        Throws:
        IllegalArgumentException - if value is < 0 or > 0xFFFFFFFFL.
      • setExtra

        public void setExtra(byte[] data)
        Sets the extra information for this ZipEntry.
        Parameters:
        data - a byte array containing the extra information.
        Throws:
        IllegalArgumentException - when the length of data is greater than 0xFFFF bytes.
      • setMethod

        public void setMethod(int value)
        Sets the compression method for this ZipEntry.
        Parameters:
        value - the compression method, either DEFLATED or STORED.
        Throws:
        IllegalArgumentException - when value is not DEFLATED or STORED.
      • setSize

        public void setSize(long value)
        Sets the uncompressed size of this ZipEntry.
        Parameters:
        value - the uncompressed size for this entry.
        Throws:
        IllegalArgumentException - if value < 0 or value > 0xFFFFFFFFL.
      • setTime

        public void setTime(long value)
        Sets the modification time of this ZipEntry.
        Parameters:
        value - the modification time as the number of milliseconds since Jan. 1, 1970.
      • toString

        public String toString()
        Returns the string representation of this ZipEntry.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this ZipEntry.
      • clone

        public Object clone()
        Returns a deep copy of this zip entry.
        Overrides:
        clone in class Object
        Returns:
        a copy of this object.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1773 / 248362389. Delta: 0.02588 с