jdk/src/share/classes/java/util/zip/ZipConstants64.java
changeset 2438 21c111b51aa8
child 2592 ef26f663a2ba
equal deleted inserted replaced
2436:ae4667371301 2438:21c111b51aa8
       
     1 /*
       
     2  * Copyright 1995-1996 Sun Microsystems, Inc.  All Rights Reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.  Sun designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Sun in the LICENSE file that accompanied this code.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    22  * CA 95054 USA or visit www.sun.com if you need additional information or
       
    23  * have any questions.
       
    24  */
       
    25 
       
    26 package java.util.zip;
       
    27 
       
    28 /*
       
    29  * This class defines the constants that are used by the classes
       
    30  * which manipulate Zip64 files.
       
    31  */
       
    32 
       
    33 class ZipConstants64 {
       
    34 
       
    35     /*
       
    36      * ZIP64 constants
       
    37      */
       
    38     static final long ZIP64_ENDSIG = 0x06064b50L;  // "PK\006\006"
       
    39     static final long ZIP64_LOCSIG = 0x07064b50L;  // "PK\006\007"
       
    40     static final int  ZIP64_ENDHDR = 56;           // ZIP64 end header size
       
    41     static final int  ZIP64_LOCHDR = 20;           // ZIP64 end loc header size
       
    42     static final int  ZIP64_EXTHDR = 24;           // EXT header size
       
    43     static final int  ZIP64_EXTID  = 0x0001;       // Extra field Zip64 header ID
       
    44 
       
    45     static final int  ZIP64_MAGICCOUNT = 0xFFFF;
       
    46     static final long ZIP64_MAGICVAL = 0xFFFFFFFFL;
       
    47 
       
    48     /*
       
    49      * Zip64 End of central directory (END) header field offsets
       
    50      */
       
    51     static final int  ZIP64_ENDLEN = 4;       // size of zip64 end of central dir
       
    52     static final int  ZIP64_ENDVEM = 12;      // version made by
       
    53     static final int  ZIP64_ENDVER = 14;      // version needed to extract
       
    54     static final int  ZIP64_ENDNMD = 16;      // number of this disk
       
    55     static final int  ZIP64_ENDDSK = 20;      // disk number of start
       
    56     static final int  ZIP64_ENDTOD = 24;      // total number of entries on this disk
       
    57     static final int  ZIP64_ENDTOT = 32;      // total number of entries
       
    58     static final int  ZIP64_ENDSIZ = 40;      // central directory size in bytes
       
    59     static final int  ZIP64_ENDOFF = 48;      // offset of first CEN header
       
    60     static final int  ZIP64_ENDEXT = 56;      // zip64 extensible data sector
       
    61 
       
    62     /*
       
    63      * Zip64 End of central directory locator field offsets
       
    64      */
       
    65     static final int  ZIP64_LOCDSK = 4;       // disk number start
       
    66     static final int  ZIP64_LOCOFF = 8;       // offset of zip64 end
       
    67     static final int  ZIP64_LOCTOT = 16;      // total number of disks
       
    68 
       
    69     /*
       
    70      * Zip64 Extra local (EXT) header field offsets
       
    71      */
       
    72     static final int  ZIP64_EXTCRC = 4;       // uncompressed file crc-32 value
       
    73     static final int  ZIP64_EXTSIZ = 8;       // compressed size, 8-byte
       
    74     static final int  ZIP64_EXTLEN = 16;      // uncompressed size, 8-byte
       
    75 
       
    76     private ZipConstants64() {}
       
    77 }