3909N/A * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This class is used to represent a ZIP file entry. 0N/A * @author David Connelly 0N/A long time = -
1;
// modification time (in DOS time) 0N/A long crc = -
1;
// crc-32 of entry data 0N/A long size = -
1;
// uncompressed size of entry data 0N/A long csize = -
1;
// compressed size of entry data 0N/A byte[]
extra;
// optional extra field data for entry 0N/A * Compression method for uncompressed entries. 0N/A * Compression method for compressed (deflated) entries. 0N/A * Creates a new zip entry with the specified name. 0N/A * @param name the entry name 0N/A * @exception NullPointerException if the entry name is null 0N/A * @exception IllegalArgumentException if the entry name is longer than 0N/A * Creates a new zip entry with fields taken from the specified 0N/A * @param e a zip Entry object 1107N/A * Creates a new un-initialized zip entry 0N/A * Returns the name of the entry. 0N/A * @return the name of the entry 0N/A * Sets the modification time of the entry. 0N/A * @param time the entry modification time in number of milliseconds 0N/A * Returns the modification time of the entry, or -1 if not specified. 0N/A * @return the modification time of the entry, or -1 if not specified 0N/A * @see #setTime(long) 0N/A * Sets the uncompressed size of the entry data. 0N/A * @param size the uncompressed size in bytes 0N/A * @exception IllegalArgumentException if the specified size is less 1032N/A * than 0, is greater than 0xFFFFFFFF when 1032N/A * or is less than 0 when ZIP64 is supported 0N/A * Returns the uncompressed size of the entry data, or -1 if not known. 0N/A * @return the uncompressed size of the entry data, or -1 if not known 0N/A * @see #setSize(long) 0N/A * Returns the size of the compressed entry data, or -1 if not known. 0N/A * In the case of a stored entry, the compressed size will be the same 0N/A * as the uncompressed size of the entry. 0N/A * @return the size of the compressed entry data, or -1 if not known 0N/A * @see #setCompressedSize(long) 0N/A * Sets the size of the compressed entry data. 0N/A * @param csize the compressed size to set to 0N/A * @see #getCompressedSize() 0N/A * Sets the CRC-32 checksum of the uncompressed entry data. 0N/A * @param crc the CRC-32 value 0N/A * @exception IllegalArgumentException if the specified CRC-32 value is 0N/A * less than 0 or greater than 0xFFFFFFFF 0N/A * Returns the CRC-32 checksum of the uncompressed entry data, or -1 if 0N/A * @return the CRC-32 checksum of the uncompressed entry data, or -1 if 0N/A * @see #setCrc(long) 0N/A * Sets the compression method for the entry. 0N/A * @param method the compression method, either STORED or DEFLATED 0N/A * @exception IllegalArgumentException if the specified compression 0N/A * Returns the compression method of the entry, or -1 if not specified. 0N/A * @return the compression method of the entry, or -1 if not specified 0N/A * @see #setMethod(int) 0N/A * Sets the optional extra field data for the entry. 0N/A * @param extra the extra field data bytes 0N/A * @exception IllegalArgumentException if the length of the specified 0N/A * extra field data is greater than 0xFFFF bytes 0N/A * Returns the extra field data for the entry, or null if none. 0N/A * @return the extra field data for the entry, or null if none 0N/A * @see #setExtra(byte[]) 0N/A * Sets the optional comment string for the entry. 1107N/A * <p>ZIP entry comments have maximum length of 0xffff. If the length of the 1107N/A * specified comment string is greater than 0xFFFF bytes after encoding, only 1107N/A * the first 0xFFFF bytes are output to the ZIP file entry. 0N/A * @param comment the comment string 0N/A * @see #getComment() 0N/A * Returns the comment string for the entry, or null if none. 0N/A * @return the comment string for the entry, or null if none 0N/A * @see #setComment(String) 0N/A * Returns true if this is a directory entry. A directory entry is 0N/A * defined to be one whose name ends with a '/'. 0N/A * @return true if this is a directory entry 0N/A * Returns a string representation of the ZIP entry. 0N/A * Converts DOS time to Java time (number of milliseconds since epoch). 0N/A * Converts Java time to DOS time. 0N/A return (
1 <<
21) | (
1 <<
16);
0N/A * Returns the hash code value for this entry. 0N/A * Returns a copy of this entry. 0N/A // This should never happen, since we are Cloneable